Skip to content

Commit

Permalink
Merge pull request #1712 from cpunion/skip-publish-prerelease
Browse files Browse the repository at this point in the history
ci: skip publish prerelease
  • Loading branch information
xushiwei authored Feb 7, 2024
2 parents fb3cd28 + 9e24102 commit 4085ba2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ jobs:
echo "TAG: $tag"
exit 1
fi
- name: Check pre-release
run: |
version=$(cat VERSION)
# check stable version format x.x.x
if ! [[ $version =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "This is a pre-release"
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
fi
- name: Set up Go
uses: actions/setup-go@v5
Expand All @@ -53,6 +62,7 @@ jobs:
WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}

- name: Upload deb/rpm to Fury.io
if: env.IS_PRERELEASE != 'true'
run: |
for file in dist/*.{deb,rpm}
do
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ winget:
- For STEM education: studying an engineering language that can be used for work in the future.
- For data science: communicating with engineers in the same language.
license: Apache-2.0
skip_upload: false
skip_upload: auto
release_notes: "{{.Changelog}}"
release_notes_url: "https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/gop/releases/tag/v{{.Version}}"
dependencies:
Expand All @@ -109,7 +109,7 @@ winget:
private_key: "{{ .Env.WINGET_PKGS_PRIVATE_KEY }}"
pull_request:
enabled: true
draft: false
draft: true
base:
owner: microsoft
name: winget-pkgs
Expand Down

0 comments on commit 4085ba2

Please sign in to comment.