-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (40 loc) · 1.47 KB
/
releaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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]