Update release.yml

This commit is contained in:
Edgar 2023-10-04 10:31:38 +02:00 committed by GitHub
parent c2b726a256
commit af5ecf70c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,44 @@
name: release name: Release
permissions:
contents: write
on: on:
release: release:
types: [created] types: [created]
jobs: jobs:
release: create-release:
name: publish ${{ matrix.name }}
strategy:
fail-fast: true
matrix:
include:
- target: x86_64-pc-windows-gnu
suffix: windows-x86_64
archive: zip
name: x86_64-pc-windows-gnu
- target: x86_64-unknown-linux-gnu
suffix: linux-x86_64
archive: tar.xz
name: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
suffix: darwin-x86_64
archive: tar.gz
name: x86_64-apple-darwin
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Clone test repository - uses: actions/checkout@v4
uses: actions/checkout@v2 - uses: taiki-e/create-gh-release-action@v1
- uses: xhaiker/rust-release.action@v1.0.0
name: build ${{ matrix.name }}
with: with:
rust_target: ${{ matrix.target }} # (required) GitHub token for creating GitHub Releases.
archive_suffix: ${{ matrix.suffix }} token: ${{ secrets.GITHUB_TOKEN }}
archive_types: ${{ matrix.archive }}
extra_files: "README.md LICENSE" upload-assets:
env: strategy:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin: ddnet-map-diff
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: unix
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}