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