Skip to content

gha: update old actions #66

gha: update old actions

gha: update old actions #66

Workflow file for this run

name: Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
services:
minio:
image: bitnami/minio:latest
ports:
- "9000:9000"
env:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: password
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.18"
- uses: actions/checkout@v4
- name: Download Modules
run: go mod download
- name: Generate
run: go generate ./...
- name: Build
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: "0"
run: go build -ldflags="-X cas/version.GitCommit=${{ github.sha }} -X cas/version.Prerelease="""
- name: Test
env:
CAS_S3_TEST_ENDPOINT: "http://localhost:9000"
run: go test -v ./...
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: cas
path: cas
- name: Generate Release Notes
run: |
echo "CAS_VERSION=$(./cas version --short)" >> "${GITHUB_ENV}"
./cas version --changelog --raw | tee release-notes.md
- name: Check if Changelog has changed
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
changelog:
- 'changelog.md'
- name: Release
if: ${{ github.ref_name == 'main' && steps.changes.outputs.changelog == 'true' }}
uses: softprops/action-gh-release@v1
with:
name: ${{ env.CAS_VERSION }}
tag_name: ${{ env.CAS_VERSION }}
body_path: release-notes.md
files: cas