|
6 | 6 | on: |
7 | 7 | release: |
8 | 8 | types: [ published ] |
9 | | - # Trigger only when a release with tag v*.*.* is published |
10 | | - tags: |
11 | | - - 'v[0-9]+.[0-9]+.[0-9]+' |
12 | 9 |
|
13 | 10 | jobs: |
14 | | - update-version: |
15 | | - runs-on: ubuntu-latest |
16 | | - steps: |
17 | | - - uses: actions/checkout@v3 |
18 | | - - name: Update version in package.json |
19 | | - run: | |
20 | | - CURRENT_TAG=${GITHUB_REF#refs/tags/} |
21 | | - echo "Current tag: $CURRENT_TAG" |
22 | | - VERSION="${CURRENT_TAG#v}" |
23 | | - echo "Updating version to: $VERSION" |
24 | | - jq ".version = \"$VERSION\"" package.json > package.json.tmp |
25 | | - mv package.json.tmp package.json |
26 | | - - name: Create Pull Request |
27 | | - uses: peter-evans/create-pull-request@v4 |
28 | | - with: |
29 | | - title: Update package.json version |
30 | | - branch: update-version |
31 | | - commit-message: Update package.json version |
32 | | - body: Update the version of `package.json` as part of release process |
33 | | - delete-branch: true |
34 | | - base: main |
35 | 11 | build: |
36 | 12 | runs-on: ubuntu-latest |
37 | 13 | permissions: |
|
47 | 23 | # https://github.com/sigstore/cosign-installer |
48 | 24 | - name: Install cosign |
49 | 25 | if: github.event_name != 'pull_request' |
50 | | - uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0 |
51 | | - with: |
52 | | - cosign-release: 'v1.13.1' |
| 26 | + |
53 | 27 |
|
54 | 28 | # Workaround: https://github.com/docker/build-push-action/issues/461 |
55 | 29 | - name: Setup Docker buildx |
|
98 | 72 | COSIGN_EXPERIMENTAL: "true" |
99 | 73 | # This step uses the identity token to provision an ephemeral certificate |
100 | 74 | # against the sigstore community Fulcio instance. |
101 | | - run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} |
| 75 | + run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push.outputs.digest }} |
0 commit comments