-
Notifications
You must be signed in to change notification settings - Fork 16
83 lines (68 loc) · 1.92 KB
/
Copy pathrelease.yaml
File metadata and controls
83 lines (68 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
packages: write
id-token: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install mise
uses: jdx/mise-action@v4
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: "go.work"
cache: true
- name: Run tests
run: mise run test
- name: Install syft for SBOM generation
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v7
if: always()
with:
name: release-artifacts
path: |
dist/
!dist/*.txt
retention-days: 30
npm-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Install dependencies
working-directory: openapi/linter/customrules/types
run: npm ci
- name: Set version from tag
working-directory: openapi/linter/customrules/types
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
- name: Build
working-directory: openapi/linter/customrules/types
run: npm run build
- name: Publish
working-directory: openapi/linter/customrules/types
run: npm publish --provenance --access public