|
| 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) Path to changelog. |
| 19 | + changelog: CHANGELOG.md |
| 20 | + # (required) GitHub token for creating GitHub Releases. |
| 21 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + |
| 23 | + upload-assets: |
| 24 | + needs: create-release |
| 25 | + strategy: |
| 26 | + matrix: |
| 27 | + include: |
| 28 | + - target: x86_64-unknown-linux-gnu |
| 29 | + os: ubuntu-latest |
| 30 | + - target: x86_64-apple-darwin |
| 31 | + os: macos-latest |
| 32 | + - target: aarch64-apple-darwin |
| 33 | + os: macos-latest |
| 34 | + - target: x86_64-pc-windows-msvc |
| 35 | + os: windows-latest |
| 36 | + runs-on: ${{ matrix.os }} |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + - uses: taiki-e/upload-rust-binary-action@v1 |
| 40 | + with: |
| 41 | + # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. |
| 42 | + # Note that glob pattern is not supported yet. |
| 43 | + bin: simple-completion-language-server |
| 44 | + # (optional) Target triple, default is host triple. |
| 45 | + # This is optional but it is recommended that this always be set to |
| 46 | + # clarify which target you are building for if macOS is included in |
| 47 | + # the matrix because GitHub Actions changed the default architecture |
| 48 | + # of macos-latest since macos-14. |
| 49 | + target: ${{ matrix.target }} |
| 50 | + # (optional) On which platform to distribute the `.tar.gz` file. |
| 51 | + # [default value: unix] |
| 52 | + # [possible values: all, unix, windows, none] |
| 53 | + tar: unix |
| 54 | + # (optional) On which platform to distribute the `.zip` file. |
| 55 | + # [default value: windows] |
| 56 | + # [possible values: all, unix, windows, none] |
| 57 | + zip: windows |
| 58 | + # (required) GitHub token for uploading assets to GitHub Releases. |
| 59 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments