From c015281a0f070e8c5a9c558d14fab405b5603827 Mon Sep 17 00:00:00 2001 From: Harry Xie Date: Sat, 9 Apr 2022 14:36:28 +0100 Subject: [PATCH] fix yaml, add on-create-release action --- .github/workflows/release-rust-binary.yml | 3 ++- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-rust-binary.yml b/.github/workflows/release-rust-binary.yml index 18fd581..25c2129 100644 --- a/.github/workflows/release-rust-binary.yml +++ b/.github/workflows/release-rust-binary.yml @@ -3,7 +3,8 @@ name: Release Rust binary on: push: tags: - - [0-9]+.* + - v[0-9]+.* + jobs: create-release: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d3e62b8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +on: + release: + types: [created] + +jobs: + release: + name: release ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-musl + archive: tar.gz tar.xz + steps: + - uses: actions/checkout@master + - name: Compile and release + uses: rust-build/rust-build.action@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUSTTARGET: ${{ matrix.target }} + ARCHIVE_TYPES: ${{ matrix.archive }}