1+ # This workflow is triggered when a release is published via the UI
2+ # The workflow is only executed if the release is a tag and the target_commitish is a release branch
3+ name : Release workflow
4+
5+ # Start the workflow as soon as a release has been published via the UI
6+ on :
7+ release :
8+ types : [published]
9+
10+ permissions :
11+ contents : write # required for checkout
12+ packages : write # required for pulling the container
13+ actions : write # required for artifact downloading
14+ pull-requests : write # Für PR-Erstellung und Management
15+
16+ jobs :
17+ call-development :
18+ name : Build the package
19+ uses : ./.github/workflows/package-development-workflow.yml
20+ secrets :
21+ APAX_TOKEN : ${{ secrets.APAX_TOKEN }}
22+ with :
23+ # checks out the branch that has been selected during the release process
24+ ref : ${{ github.event.release.target_commitish }}
25+
26+ release :
27+ name : Release the package
28+ needs : call-development
29+ runs-on : ubuntu-24.04
30+ container :
31+ image : ghcr.io/simatic-ax/ci-images/apax-ci-image:3.5.0
32+ credentials :
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+ steps :
36+ - name : Checkout Code
37+ uses : actions/checkout@v4
38+ with :
39+ ref : ${{ github.event.release.target_commitish }}
40+ fetch-depth : 0
41+
42+ - name : Create bin folder
43+ run : mkdir -p bin
44+
45+ - name : Download build artifacts
46+ uses : actions/download-artifact@v4
47+ with :
48+ name : build-artifacts
49+ path : bin
50+
51+ - name : Version package
52+ uses : simatic-ax/actions/apax-version@v3
53+ with :
54+ version : ${{ github.event.release.tag_name }}
55+
56+ - name : Package source code
57+ uses : simatic-ax/actions/apax-pack@v3
58+ with :
59+ key : ${{ secrets.APAX_SIGNKEY }}
60+
61+ - name : Login to required registries
62+ uses : simatic-ax/actions/apax-login@v3
63+ with :
64+ apax-token : ${{ secrets.APAX_TOKEN }}
65+ registries : |
66+ https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }}
67+
68+ - name : Publish apax package
69+ uses : simatic-ax/actions/apax-publish@v3
70+ with :
71+ registries : |
72+ https://npm.pkg.github.com
0 commit comments