Skip to content

Commit

Permalink
Add release-tag workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paultristanwagner committed Nov 15, 2024
1 parent 26e56aa commit cb534bc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build

on:
workflow_call:
push:
branches:
- main
Expand All @@ -14,13 +15,21 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '18'
cache: gradle


- name: Build with Gradle
run: ./gradlew jar
run: ./gradlew jar

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: model-checking
path: build/libs/model-checking-1.0-SNAPSHOT.jar
32 changes: 32 additions & 0 deletions .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Tag

on:
push:
tags:
- v*

permissions:
contents: write

jobs:
build:
uses: ./.github/workflows/build.yml
release-tag:
name: Release Tag
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: model-checking
- name: Rename artifact
run: mv model-checking-*.jar model-checking-v${tag#v}.jar
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" model-checking-v${tag#v}.jar \
--repo="$GITHUB_REPOSITORY" \
--title="v${tag#v}"

0 comments on commit cb534bc

Please sign in to comment.