From dd7942716e74fafd51b2e051c844c3bea77e1bb9 Mon Sep 17 00:00:00 2001 From: Shuhei Takahashi Date: Thu, 23 May 2024 22:17:56 +0900 Subject: [PATCH] Add release workflow --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bb54a25 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: release + +on: + push: + tags: + - "v*.*.*" + +jobs: + release: + name: Publish a release + runs-on: ubuntu-latest + steps: + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + - name: Checkout + uses: actions/checkout@v4 + - name: Create an archive + run: git archive --format tar.gz --prefix rules_contest-${RELEASE_VERSION}/ -o rules_contest-${RELEASE_VERSION}.tar.gz ${GITHUB_REF} + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: "rules_contest-${{ env.RELEASE_VERSION }}.tar.gz" + env: + RELEASE_VERSION: unknown