Skip to content

Commit

Permalink
test release
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman committed Apr 19, 2024
1 parent a3ae7f6 commit a1de202
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- v*

jobs:

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Fail for non-tagged commits
- name: Tag Check
run: git describe --exact-match --tags

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false

- name: Lint
uses: golangci/golangci-lint-action@v4

- name: Validate Go modules
run: ./scripts/validate

- name: Test
run: ./scripts/test

- name: Get Tag
if: startsWith(github.ref, 'refs/tags/v')
run: echo "GITHUB_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV

- name: Build
env:
CROSS: 1
run: ./scripts/build

- name: Package
run: |
./scripts/package
ls -lR dist/artifacts
# Stage binary for packaging step
cp -r ./bin/* ./package/
# Export the tag for the next step
source ./scripts/version
echo "VERSION=$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Docker Build
uses: docker/build-push-action@v5
with:
context: package
tags: enrichman/cli2:${{ env.VERSION }}

0 comments on commit a1de202

Please sign in to comment.