|
| 1 | +name: Release |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: write |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + tags: |
| 9 | + - v[0-9]+.* |
| 10 | + |
| 11 | +jobs: |
| 12 | + create-release: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - uses: taiki-e/create-gh-release-action@v1 |
| 17 | + with: |
| 18 | + # # (optional) |
| 19 | + # changelog: CHANGELOG.md |
| 20 | + # (required) |
| 21 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + |
| 23 | + upload-assets: |
| 24 | + needs: create-release |
| 25 | + strategy: |
| 26 | + matrix: |
| 27 | + include: |
| 28 | + - target: aarch64-apple-darwin |
| 29 | + os: macos-latest |
| 30 | + # - target: x86_64-unknown-linux-gnu |
| 31 | + # os: ubuntu-latest |
| 32 | + - target: x86_64-unknown-linux-gnu |
| 33 | + os: ubuntu-20.04 |
| 34 | + - target: x86_64-apple-darwin |
| 35 | + os: macos-latest |
| 36 | + - target: universal-apple-darwin |
| 37 | + os: macos-latest |
| 38 | + - target: x86_64-pc-windows-msvc |
| 39 | + os: windows-latest |
| 40 | + - target: i686-pc-windows-msvc |
| 41 | + os: windows-latest |
| 42 | + - target: aarch64-pc-windows-msvc |
| 43 | + os: windows-latest |
| 44 | + runs-on: ${{ matrix.os }} |
| 45 | + env: |
| 46 | + ENABLE_RUNTIME_TESTS: false |
| 47 | + steps: |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + - name: Install musl-tools on Linux |
| 50 | + run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools |
| 51 | + if: contains(matrix.target, 'musl') |
| 52 | + - name: Install tools |
| 53 | + run: sudo apt-get update --yes && sudo apt-get install --yes libxi-dev libx11-dev libxcb1 libxrandr2 libdbus-1-3 libxtst-dev |
| 54 | + if: contains(matrix.os, 'ubuntu') |
| 55 | + - uses: taiki-e/upload-rust-binary-action@v1 |
| 56 | + with: |
| 57 | + # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. |
| 58 | + # Note that glob pattern is not supported yet. |
| 59 | + bin: minicode |
| 60 | + # (optional) Target triple, default is host triple. |
| 61 | + target: ${{ matrix.target }} |
| 62 | + # (required) GitHub token for uploading assets to GitHub Releases. |
| 63 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments