1+ # This workflow is triggered when a release is published via the UI
2+ name : Release workflow
3+
4+ # Start the workflow as soon as a release has been published via the UI
5+ on :
6+ release :
7+ types : [published]
8+
9+ permissions :
10+ contents : read # required for checkout
11+ packages : write # required for pulling the container
12+ actions : write # required for artifact uploading
13+
14+ env :
15+ TEMPLATE_PATH : working-directory
16+
17+ jobs :
18+ call-development :
19+ name : Build the package
20+ uses : ./.github/workflows/package-development-workflow.yml
21+ secrets :
22+ APAX_TOKEN : ${{ secrets.APAX_TOKEN }}
23+ with :
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+ # checks out the branch that has been selected during the release process
40+ ref : ${{ github.event.release.target_commitish }}
41+ fetch-depth : 0
42+
43+ - name : Version package
44+ uses : simatic-ax/actions/apax-version@v3
45+ with :
46+ version : ${{ github.event.release.tag_name }}
47+
48+ - name : Templatify repository
49+ uses : simatic-ax/actions/apax-templatify@v3
50+ with :
51+ version : ${{ github.event.release.tag_name }}
52+
53+ - name : Version package
54+ uses : simatic-ax/actions/apax-version@v3
55+ with :
56+ version : ${{ github.event.release.tag_name }}
57+ path : ${{ env.TEMPLATE_PATH }}/template
58+
59+ - name : Pack the template
60+ uses : simatic-ax/actions/apax-pack@v3
61+ with :
62+ key : ${{ secrets.APAX_SIGNKEY }}
63+ path : ${{ env.TEMPLATE_PATH }}
64+
65+ - name : Login to required registries
66+ uses : simatic-ax/actions/apax-login@v3
67+ with :
68+ apax-token : ${{ secrets.APAX_TOKEN }}
69+ registries : |
70+ https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }}
71+
72+ - name : Publish apax package
73+ uses : simatic-ax/actions/apax-publish@v3
74+ with :
75+ registries : |
76+ https://npm.pkg.github.com
77+ tag : latest
78+ path : ${{ env.TEMPLATE_PATH }}
0 commit comments