|
8 | 8 | permissions: |
9 | 9 | contents: write |
10 | 10 |
|
11 | | -env: |
12 | | - # renovate: datasource=go depName=github.com/goreleaser/goreleaser |
13 | | - GORELEASER_VERSION: v1.18.2 |
14 | | - |
15 | 11 | jobs: |
16 | 12 | binaries: |
17 | 13 | name: Goreleaser release |
18 | 14 | runs-on: ubuntu-latest |
19 | 15 | if: startsWith(github.ref, 'refs/tags/') |
20 | 16 | steps: |
21 | 17 | - name: Checkout |
22 | | - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 |
| 18 | + uses: actions/checkout@v4 |
23 | 19 | with: |
24 | 20 | fetch-depth: 0 |
25 | 21 |
|
26 | 22 | - name: Set up Go |
27 | | - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 |
| 23 | + uses: actions/setup-go@v5 |
28 | 24 | with: |
29 | 25 | go-version-file: 'go.mod' |
30 | 26 |
|
31 | 27 | - name: Run GoReleaser |
32 | | - uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 |
| 28 | + uses: goreleaser/goreleaser-action@v6 |
33 | 29 | with: |
34 | 30 | distribution: goreleaser |
35 | | - version: ${{ env.GORELEASER_VERSION }} |
36 | | - args: release --clean --timeout=60m |
| 31 | + args: release --clean |
37 | 32 | env: |
38 | 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
39 | 34 |
|
40 | 35 | - name: Archive generated artifacts |
41 | | - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0 |
| 36 | + uses: actions/upload-artifact@v4 |
42 | 37 | with: |
43 | 38 | name: parca-debuginfo-dist-release |
44 | 39 | if-no-files-found: error |
45 | 40 | path: | |
46 | | - goreleaser/dist |
47 | | - !goreleaser/dist/*.txt |
| 41 | + dist/ |
48 | 42 |
|
49 | 43 | docs: |
50 | 44 | name: Publish Docs |
51 | 45 | runs-on: ubuntu-latest |
52 | 46 | needs: binaries |
53 | 47 | steps: |
54 | | - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 |
| 48 | + - uses: actions/checkout@v4 |
55 | 49 |
|
56 | 50 | - name: Publish Vercel |
57 | 51 | run: | |
58 | 52 | curl -X POST "https://api.vercel.com/v1/integrations/deploy/${{ secrets.VERCEL_WEBHOOK }}" |
59 | | -
|
60 | | - container: |
61 | | - name: Build and release container images |
62 | | - runs-on: ubuntu-latest |
63 | | - needs: binaries |
64 | | - container: |
65 | | - # https://github.com/containers/podman/tree/main/contrib/podmanimage |
66 | | - # Specifying SHA repeatedly fails: |
67 | | - # @sha256:421ac576cebff98e90c531e7b9ce4482370ecc7cee59abc2341714031bfb5f43 |
68 | | - image: quay.io/containers/podman:v4.1.1 |
69 | | - options: >- |
70 | | - --device /dev/fuse:rw |
71 | | - --privileged |
72 | | - --security-opt label=disable |
73 | | - --security-opt seccomp=unconfined |
74 | | - permissions: |
75 | | - id-token: write |
76 | | - packages: write |
77 | | - contents: read |
78 | | - steps: |
79 | | - - name: Install dependencies |
80 | | - run: dnf install --assumeyes --repo fedora git make jq |
81 | | - |
82 | | - - name: Check out code into the Go module directory |
83 | | - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2 |
84 | | - |
85 | | - - name: Get branch name |
86 | | - shell: bash |
87 | | - run: echo "GITHUB_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV |
88 | | - |
89 | | - - uses: actions/download-artifact@v3 |
90 | | - with: |
91 | | - name: parca-debuginfo-dist-release |
92 | | - path: goreleaser/dist |
93 | | - |
94 | | - - name: Build container |
95 | | - run: make container |
96 | | - |
97 | | - - name: Check images are created |
98 | | - run: podman images | grep 'ghcr.io/parca-dev/parca-debuginfo' |
99 | | - |
100 | | - - name: Login to registry |
101 | | - if: ${{ github.event_name != 'pull_request' }} |
102 | | - run: | |
103 | | - echo "${{ secrets.GITHUB_TOKEN }}" | podman login -u parca-dev --password-stdin ghcr.io |
104 | | -
|
105 | | - - name: Install cosign |
106 | | - uses: sigstore/cosign-installer@09a077b27eb1310dcfb21981bee195b30ce09de0 # tag=v2.5.0 |
107 | | - |
108 | | - - name: Install crane |
109 | | - if: ${{ github.event_name != 'pull_request' }} |
110 | | - uses: imjasonh/setup-crane@e82f1b9a8007d399333baba4d75915558e9fb6a4 # tag=v0.2 |
111 | | - |
112 | | - - name: Push container |
113 | | - if: ${{ github.event_name != 'pull_request' }} |
114 | | - run: | |
115 | | - make push-container |
116 | | -
|
117 | | - - name: Sign container |
118 | | - env: |
119 | | - COSIGN_EXPERIMENTAL: true |
120 | | - run: | |
121 | | - make sign-container |
0 commit comments