gipo355 is automatically releasing π #82
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 Workflow | |
run-name: ${{ github.actor }} is automatically releasing π | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
# - next | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
release: | |
if: github.event.pull_request.draft == false | |
name: Release Job | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write # to enable use of OIDC for npm provenance | |
steps: | |
- name: Checkout Step | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | |
with: | |
fetch-depth: 0 # get all history for git tags | |
persist-credentials: false # <<<--- This line is needed for security | |
- uses: ./.github/actions/ci-setup | |
name: Setup CI environment | |
# build javadoc and war to add them to the release as assets (must be zipped) | |
- name: Build Javadoc with Gradle Wrapper Step | |
run: ./gradlew javadoc | |
- name: Build War with Gradle Wrapper Step | |
run: ./gradlew war | |
- name: Create Zip archive Step | |
run: zip -r javadoc ./build/docs/javadoc | |
- name: Release Step | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} # personal access token for triggering the github_publish workflow and bypassing branch protection rules | |
run: npx [email protected] |