99 release :
1010 concurrency : release
1111 runs-on : ubuntu-latest
12- environment : main
1312 permissions :
1413 # IMPORTANT: this permission is mandatory for trusted publishing
1514 id-token : write
1615 contents : write
1716 issues : write
1817 pull-requests : write
1918 steps :
20- - name : Generate token from app token # https://github.com/tibdex/github-app-token
21- id : generate_token
22- uses : tibdex/github-app-token@v2
23- with :
24- app_id : ${{ secrets.RELEASE_BOT_APP_ID }}
25- private_key : ${{ secrets.RELEASE_BOT_PKEY }}
2619
2720 - uses : actions/checkout@v4
2821 with :
2922 fetch-depth : 0
30- token : ${{ steps.generate_token.outputs.token }}
3123
3224 - name : configure git
3325 run : |
@@ -41,55 +33,18 @@ jobs:
4133 registry-url : ' https://registry.npmjs.org'
4234 scope : ' @affinidi-tdk'
4335
44- - name : Set up Python
45- uses : actions/setup-python@v3
46- with :
47- python-version : ' 3.x'
4836
4937 - name : Setup Flutter SDK
5038 uses : flutter-actions/setup-flutter@v4
5139 with :
5240 channel : stable
5341 version : 3.27.0
5442
55- - name : install python tools
56- run : |
57- pip install twine
58- pip install poetry==1.8.5
59-
60- - name : Mint pypi token
61- id : mint
62- 6343
64- - name : Install gpg secret key for java Maven
65- run : |
66- echo "${{ secrets.MAVEN_GPG_SECRET_KEY }}" | gpg --batch --import
67- gpg --list-secret-keys --keyid-format LONG
6844
69- - name : Set up JDK for deploy to Sonatype
70- uses : actions/setup-java@v4
71- with :
72- distribution : ' corretto'
73- java-version : 21
74- server-id : central
75- server-username : MAVEN_USERNAME
76- server-password : MAVEN_CENTRAL_TOKEN
77- gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
78- gpg-passphrase : MAVEN_GPG_SECRET_KEY_PASSWORD
7945
8046 - run : npm ci
8147 # Generate tag/changelog with semantic release
8248 # setting parallel higher than one might cause problems with locking git repo
8349 - run : npx nx affected -t semantic-release --parallel=false --base=$BASE_SHA --head=HEAD
8450 name : semantic release
85- env :
86- GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
87- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
88- MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
89- MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
90- MAVEN_GPG_SECRET_KEY_PASSWORD : ${{ secrets.MAVEN_GPG_SECRET_KEY_PASSWORD }}
91- TWINE_USERNAME : ' __token__'
92- TWINE_PASSWORD : ${{ steps.mint.outputs.api-token }}
93- POETRY_PYPI_TOKEN_PYPI : ${{ steps.mint.outputs.api-token }}
94- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
95- BASE_SHA : ${{ github.event.before }}
0 commit comments