cloudflare/pint

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.58.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/compile.yml

68lines · 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
16jobs:
17 build:
18 runs-on: ubuntu-latest
19 steps:
20 - name: Check out code
21 uses: actions/checkout@v4
22 with:
23 show-progress: false
24 fetch-depth: 0
25
26 - name: Set up Go
27 uses: actions/setup-go@v5
28 with:
29 go-version-file: go.ver
30
31 - name: Set up QEMU
32 uses: docker/setup-qemu-action@v3
33
34 - name: Docker Login
35 uses: docker/login-action@v3
36 with:
37 registry: ghcr.io
38 username: ${{ github.repository_owner }}
39 password: ${{ secrets.GITHUB_TOKEN }}
40
41 - name: Test releasing binaries
42 if: github.event_name == 'pull_request'
43 uses: goreleaser/goreleaser-action@v5
44 with:
45 args: release --clean --skip=validate --skip=sign --skip=sbom --skip=publish --snapshot
46
47 - name: Extract release changelog
48 if: startsWith(github.ref, 'refs/tags/')
49 id: changelog
50 uses: sean0x42/markdown-extract@v2
51 with:
52 file: docs/changelog.md
53 pattern: "${{ github.ref_name }}"
54 no-print-matched-heading: true
55
56 - name: Write changelog
57 if: startsWith(github.ref, 'refs/tags/')
58 run: |
59 mkdir .tmp
60 printf '${{ steps.changelog.outputs.markdown }}' > .tmp/changelog.txt
61
62 - name: Release binaries
63 if: startsWith(github.ref, 'refs/tags/')
64 uses: goreleaser/goreleaser-action@v5
65 with:
66 args: release --clean --release-notes=.tmp/changelog.txt
67 env:
68 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69