Skip to content

Commit 244ab14

Browse files
authored
Merge pull request #8 from OneFineDev/feat/refactor
ci: test skip on no v increment
2 parents 7a2a09e + bbb3f42 commit 244ab14

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a golang project
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
33

4-
name: PR
4+
name: CI
55

66
on:
77
pull_request:
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Release
22
on:
3-
push:
4-
branches:
5-
- main
3+
workflow_run:
4+
workflows:
5+
- "CI"
6+
types:
7+
- completed
68

79
permissions:
810
contents: write
@@ -12,7 +14,8 @@ permissions:
1214

1315
jobs:
1416
release:
15-
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
17+
if: ${{ github.event.workflow_run.conclusion == 'success' }} &&
18+
${{ github.event.workflow_run.head_branch == 'main' }}
1619
runs-on: ubuntu-latest
1720
permissions:
1821
contents: write
@@ -36,6 +39,7 @@ jobs:
3639
pushTag: true
3740
- name: Run GoReleaser
3841
uses: goreleaser/goreleaser-action@v6
42+
if: ${{ steps.svu.outputs.changed == 'true' }}
3943
with:
4044
# either 'goreleaser' (default) or 'goreleaser-pro'
4145
distribution: goreleaser

0 commit comments

Comments
 (0)