Skip to content

Commit c06573d

Browse files
committed
ci: upgrade to trusted publishing
1 parent adae703 commit c06573d

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
11
name: CI
22

3+
permissions: {}
4+
35
on:
46
pull_request:
57
push:
68
branches:
79
- alpha
810
- beta
11+
- main
912
- master
1013
- renovate/**
1114

1215
jobs:
13-
prepare_jobs:
14-
name: "Prepare: job optimization"
15-
runs-on: ubuntu-latest
16-
outputs:
17-
pr_found: ${{ steps.pr.outputs.pr_found }}
18-
steps:
19-
- name: Get current PR
20-
id: pr
21-
uses: 8BitJonny/gh-get-current-pr@4056877062a1f3b624d5d4c2bedefa9cf51435c9 # 4.0.0
22-
with:
23-
filterOutClosed: true
24-
filterOutDraft: true
16+
ci-optimization:
17+
name: CI optimization
18+
uses: dargmuesli/github-actions/.github/workflows/ci-optimization.yml@a8900fcf9e9d1e7f4c1138484cb7bf8d7bd3f3cb # 3.0.0
19+
permissions:
20+
pull-requests: read
2521
release_semantic_dry:
26-
needs: prepare_jobs
22+
needs: ci-optimization
23+
if: needs.ci-optimization.outputs.continue == 'true'
2724
name: Release (semantic, dry)
28-
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@4e6e3d3fa4b81be372036d8ac7b14638d27be045 # 2.7.0
29-
if: needs.prepare_jobs.outputs.pr_found == 'false' || github.event_name == 'pull_request'
25+
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@a8900fcf9e9d1e7f4c1138484cb7bf8d7bd3f3cb # 3.0.0
3026
permissions:
3127
contents: write
28+
id-token: write
3229
secrets:
3330
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
34-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3531
with:
3632
DRY_RUN: true
33+
INSTALL_NODE_DEPENDENCIES: true
3734
build:
3835
name: Build
39-
uses: dargmuesli/github-actions/.github/workflows/docker.yml@4e6e3d3fa4b81be372036d8ac7b14638d27be045 # 2.7.0
36+
uses: dargmuesli/github-actions/.github/workflows/docker.yml@a8900fcf9e9d1e7f4c1138484cb7bf8d7bd3f3cb # 3.0.0
4037
needs: release_semantic_dry
4138
permissions:
4239
packages: write
43-
release-semantic:
40+
with:
41+
TAG: ${{ needs.release_semantic_dry.outputs.new_release_version }}
42+
release_semantic:
4443
needs: build
4544
name: Release (semantic)
46-
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@4e6e3d3fa4b81be372036d8ac7b14638d27be045 # 2.7.0
45+
uses: dargmuesli/github-actions/.github/workflows/release-semantic.yml@a8900fcf9e9d1e7f4c1138484cb7bf8d7bd3f3cb # 3.0.0
4746
permissions:
4847
contents: write
48+
id-token: write
4949
secrets:
5050
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
51-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
with:
52+
INSTALL_NODE_DEPENDENCIES: true

0 commit comments

Comments
 (0)