Skip to content

Commit 19d93b6

Browse files
committed
ci: workflows
1 parent 90a0277 commit 19d93b6

File tree

2 files changed

+32
-11
lines changed

2 files changed

+32
-11
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,20 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
permissions:
15-
contents: write
1614
steps:
17-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1816
with:
1917
fetch-depth: 0
20-
- uses: actions/setup-go@v2
18+
- uses: actions/setup-go@v5
2119
with:
2220
go-version: stable
2321
- run: go mod tidy
2422
- run: go test -v ./...
25-
- uses: docker/login-action@v1
26-
with:
27-
registry: ghcr.io
28-
username: ${{ github.repository_owner }}
29-
password: ${{ secrets.GH_PAT }}
3023
- uses: goreleaser/goreleaser-action@v6
31-
if: success() && startsWith(github.ref, 'refs/tags/') # only on tags
3224
with:
3325
distribution: pro
3426
version: latest
35-
args: release --clean
27+
args: release --clean --snapshot
3628
env:
3729
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3830
dependabot:

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version: stable
20+
- name: npm-login
21+
run: |
22+
npm config set '//registry.npmjs.org/:_authToken'=${{ secrets.NPM_TOKEN }}
23+
- uses: goreleaser/goreleaser-action@v6
24+
with:
25+
distribution: pro
26+
version: latest
27+
args: release --clean
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)