-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update version.go in releaser github workflow
Resolve #307.
- Loading branch information
Roman Inflianskas
committed
Feb 5, 2024
1 parent
6cdb7a6
commit 4ac9ce5
Showing
1 changed file
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,34 @@ jobs: | |
releaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- id: sha | ||
run: echo "sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | ||
- id: version | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
WITH_V: true | ||
DRY_RUN: true | ||
- run: | | ||
tee version.go << END | ||
package aiven | ||
// Version returns aiven-go-client version string | ||
func Version() string { | ||
return "${{ steps.version.outputs.new_tag }}" | ||
} | ||
END | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "chore(version.go): update aiven-go-client version" | ||
git push | ||
- id: sha | ||
run: | | ||
GIT_SHA=$(git rev-parse HEAD) | ||
echo "sha=${GIT_SHA::7}" >> $GITHUB_OUTPUT | ||
- id: tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|