workflow_call instead of workflow_run #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | ||
on: | ||
push: | ||
paths: | ||
- 'VERSION' | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
semvertag: ${{ steps.getver.outputs.semvertag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Build | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-version: wrapper | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Read version file | ||
id: getver | ||
run: | | ||
VER=$(cat VERSION) | ||
echo "VERSION=$VER" >> $GITHUB_ENV | ||
echo "semvertag=$VER" >> $GITHUB_OUTPUT | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true | ||
files: build/libs/adm.war | ||
tag_name: v${{ env.VERSION }} | ||
docker_publish: | ||
needs: | ||
- release | ||
uses: ./github/workflows/docker-publish.yml | ||
with: | ||
semvertag: ${{ needs.release.outputs.semvertag }} |