From af5ecf70c3a31c9d669f60ec0ea51b82ff8d2e9b Mon Sep 17 00:00:00 2001 From: Edgar Date: Wed, 4 Oct 2023 10:31:38 +0200 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 64 +++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 477bc54..edcf6b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,38 +1,44 @@ -name: release +name: Release + +permissions: + contents: write on: release: types: [created] jobs: - 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 + create-release: runs-on: ubuntu-latest steps: - - name: Clone test repository - uses: actions/checkout@v2 - - uses: xhaiker/rust-release.action@v1.0.0 - name: build ${{ matrix.name }} + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 with: - rust_target: ${{ matrix.target }} - archive_suffix: ${{ matrix.suffix }} - archive_types: ${{ matrix.archive }} - extra_files: "README.md LICENSE" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # (required) GitHub token for creating GitHub Releases. + token: ${{ secrets.GITHUB_TOKEN }} + + upload-assets: + strategy: + 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 }}