Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update version.go in releaser github workflow #329

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Loading