Merge pull request #13 from streemtech/dependabot/go_modules/github.c… #28
This file contains hidden or 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
name: Go | |
on: | |
#renamed to main | |
push: | |
branches: [main] | |
jobs: | |
tests: | |
env: | |
GOPRIVATE: github.com/streemtech | |
runs-on: ubuntu-latest | |
# outputs: | |
# newTag: ${{ steps.bump_tag.outputs.new_tag }} | |
# tagMajor: ${{ steps.semver_parser.outputs.major }} | |
# tagMinor: ${{ steps.semver_parser.outputs.minor }} | |
# tagPatch: ${{ steps.semver_parser.outputs.patch }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Setup git config | |
run: git config --global url."https://x-oauth-basic:${{ secrets.GO_MODULES_TOKEN }}@github.com".insteadOf "https://github.com" | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.24 | |
- name: Cache go files | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Test | |
uses: robherley/go-test-action@v0 | |
with: | |
testArguments: " -v ./..." | |
- name: Bump version and push tag | |
id: bump_tag | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DEFAULT_BUMP: patch |