From a01d66e4b209aa7b108bd85210d4541197f66794 Mon Sep 17 00:00:00 2001 From: Paul Wagner Date: Fri, 15 Nov 2024 20:56:34 +0100 Subject: [PATCH] Add release-tag workflow --- .github/workflows/build.yml | 1 + .github/workflows/release_tag.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/release_tag.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 448951a..6451a45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: Build on: + workflow_call: push: branches: - main diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml new file mode 100644 index 0000000..8c64daa --- /dev/null +++ b/.github/workflows/release_tag.yml @@ -0,0 +1,29 @@ +name: Release Tag + +on: + push: + tags: + - v* + +permissions: + contents: write + +jobs: + release-tag: + name: Release Tag + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build + uses: ./.github/workflows/build.yml + + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: | + gh release create "$tag" build/libs/model-checking-1.0-SNAPSHOT.jar \ + --repo="$GITHUB_REPOSITORY" \ + --title="v${tag#v}" \ No newline at end of file