From 00e6d8e0712b6424869b6d2c0828aafddd6262e9 Mon Sep 17 00:00:00 2001 From: hituzi no sippo Date: Mon, 11 Dec 2023 13:01:50 +0900 Subject: [PATCH] ci(github-actions): add GitHub Actions workflow to create GitHub Release --- .github/workflows/create-gh-release.yml | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/create-gh-release.yml diff --git a/.github/workflows/create-gh-release.yml b/.github/workflows/create-gh-release.yml new file mode 100644 index 0000000..0f35cac --- /dev/null +++ b/.github/workflows/create-gh-release.yml @@ -0,0 +1,51 @@ +name: Create GitHub release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Release + uses: softprops/action-gh-release@v1 + + upload-assets: + needs: create-release + + strategy: + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + - os: ubuntu-latest + target: aarch64-unknown-linux-gnu + - os: ubuntu-latest + target: aarch64-unknown-linux-musl + - os: macos-latest + target: x86_64-apple-darwin + - os: macos-latest + target: aarch64-apple-darwin + - os: windows-latest + target: x86_64-pc-windows-msvc + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: shellharden + target: ${{ matrix.target }} + archive: shellharden-$target + checksum: sha512 + token: ${{ secrets.GITHUB_TOKEN }}