Skip to content

Commit

Permalink
change version:
Browse files Browse the repository at this point in the history
for release canndidate:
binary: sling
version: 1.2.20-rc{1,2,3...}-timeplus

for final release:
binary: sling
version: 1.2.20-timeplus
  • Loading branch information
yokofly committed Oct 15, 2024
1 parent 4560978 commit 764b621
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version number for this release (e.g., v1.0.0)'
description: 'Version number for this release (e.g., v1.0.0 or v1.0.0-rc1)'
required: true
default: 'v1.0.0'

Expand All @@ -25,6 +25,18 @@ jobs:
with:
go-version: '1.22' # Adjust this to your Go version

- name: Set release version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
git config user.name github-action
git config user.email [email protected]
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}
else
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -33,6 +45,7 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ env.RELEASE_VERSION }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
7 changes: 5 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: sling-timeplus
project_name: sling

before:
hooks:
Expand All @@ -20,8 +20,10 @@ builds:
- amd64
- arm64
ldflags:
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}-timeplus'"

git:
prerelease_suffix: "-rc"
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
Expand All @@ -41,6 +43,7 @@ changelog:
- '^test:'

release:
prerelease: auto
github:
owner: timeplus-io
name: sling-cli

0 comments on commit 764b621

Please sign in to comment.