-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (50 loc) · 2.03 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Create Release
on:
# Allows this workflow to be run manually from the "Actions" tab.
workflow_dispatch:
inputs:
release-tag:
type: string
description: Release Tag
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions:
contents: write
# For each step that uses `gh`, we need to set the `GITHUB_TOKEN`:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: "${{ github.event.inputs.release-tag }}"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Create Tag and Release
run: |
git tag "$TAG"
git push origin "$TAG"
gh release create "$TAG" --repo="$GITHUB_REPOSITORY" --title="$TAG" --prerelease
upload-artifacts:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#about-matrix-strategies
strategy:
matrix:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#standard-github-hosted-runners-for-public-repositories
os: [macos-latest, macos-13, ubuntu-24.04-arm, ubuntu-latest] # TODO: windows-latest
runs-on: ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install elan
run: |
set -o pipefail
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- --default-toolchain none -y
"$HOME/.elan/bin/lean" --version
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Build Library
run: lake build
- name: Upload Artifacts
run: lake upload "${{ github.event.inputs.release-tag }}"