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