Skip to content

Commit 2af6101

Browse files
committed
refactor: simplify CI and release workflows by removing redundant steps and improving structure
1 parent 6af1b3f commit 2af6101

File tree

3 files changed

+51
-341
lines changed

3 files changed

+51
-341
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 20 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,28 @@
1-
name: Release
2-
1+
name: release
32
on:
43
push:
54
tags:
6-
- 'v*'
7-
workflow_dispatch:
8-
inputs:
9-
tag:
10-
description: 'Tag to release'
11-
required: true
12-
default: 'v0.1.0'
13-
14-
permissions:
15-
contents: write
16-
packages: write
5+
- "v*.*.*"
176

187
jobs:
198
goreleaser:
209
runs-on: ubuntu-latest
21-
10+
permissions:
11+
contents: write
12+
packages: write
13+
pull-requests: write
14+
repository-projects: write
2215
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
28-
- name: Set up Go
29-
uses: actions/setup-go@v5
30-
with:
31-
go-version: '1.21'
32-
33-
- name: Install Task
34-
run: |
35-
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
36-
37-
- name: Run tests
38-
run: task test
39-
40-
- name: Run linting
41-
run: task lint
42-
43-
- name: Log in to GitHub Container Registry
44-
uses: docker/login-action@v3
45-
with:
46-
registry: ghcr.io
47-
username: ${{ github.actor }}
48-
password: ${{ secrets.GITHUB_TOKEN }}
49-
50-
- name: Run GoReleaser
51-
uses: goreleaser/goreleaser-action@v5
52-
with:
53-
distribution: goreleaser
54-
version: latest
55-
args: release --clean
56-
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
59-
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.22"
22+
- name: GoReleaser
23+
uses: goreleaser/goreleaser-action@v6
24+
with:
25+
version: latest
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)