cloudflare/pint

Public

mirrored from https://github.com/cloudflare/pintAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.81.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/compile.yml

75lines · modecode

1name: Compile
2
3on:
4 push:
5 branches:
6 - main
7 tags:
8 - "*"
9 pull_request:
10 branches:
11 - main
12 release:
13 types:
14 - published
15
16permissions:
17 contents: write
18 packages: write
19
20jobs:
21 build:
22 runs-on: ubuntu-latest
23 steps:
24 - name: Check out code
25 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26 with:
27 show-progress: false
28 fetch-depth: 0
29
30 - name: Set up Go
31 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
32 with:
33 go-version-file: go.ver
34
35 - name: Set up QEMU
36 uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
37
38 - name: Docker Login
39 uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
40 with:
41 registry: ghcr.io
42 username: ${{ github.repository_owner }}
43 password: ${{ secrets.GITHUB_TOKEN }}
44
45 - name: Test releasing binaries
46 if: github.event_name == 'pull_request'
47 uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
48 with:
49 args: release --clean --skip=validate --skip=sign --skip=sbom --skip=publish --snapshot
50
51 - name: Extract release changelog
52 if: startsWith(github.ref, 'refs/tags/')
53 id: changelog
54 uses: sean0x42/markdown-extract@4178293dd16a52514b6cb2c01f4d309d264b2736 # v2
55 with:
56 file: docs/changelog.md
57 pattern: "${{ github.ref_name }}"
58 no-print-matched-heading: true
59
60 - name: Write changelog
61 if: startsWith(github.ref, 'refs/tags/')
62 run: |
63 mkdir .tmp
64 exec 3<<'HERE'
65 ${{ steps.changelog.outputs.markdown }}
66 HERE
67 cat /dev/fd/3 | tee .tmp/changelog.txt
68
69 - name: Release binaries
70 if: startsWith(github.ref, 'refs/tags/')
71 uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
72 with:
73 args: release --clean --release-notes=.tmp/changelog.txt
74 env:
75 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76