Skip to content

Make semver packager usable as a golang library (#8) #68

Make semver packager usable as a golang library (#8)

Make semver packager usable as a golang library (#8) #68

Workflow file for this run

name: VersionBump CI
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
setup:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-deps.outputs.cache-hit }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
- name: Cache Go modules
id: cache-deps
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: make init-project
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
- name: Restore Go modules cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ needs.setup.outputs.cache-key }}
- name: Run tests
run: make test
lint:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
- name: Restore Go modules cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ needs.setup.outputs.cache-key }}
- name: Run lint checks
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
make lint