Skip to content

Commit

Permalink
Separate test and release GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvl committed Mar 2, 2024
1 parent c155bcf commit 0797630
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
name: App build and release
name: Release

on:
push:
tags:
- '**'
branches:
- '**'
paths-ignore:
- README.md
- 'docs/**'
- 'main'

jobs:
test:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version-file: "go.mod"
cache: true

- name: Tests
run: |
make build lint
release:
if: github.ref == 'refs/heads/main'
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test

on:
push:
branches:
- '**'
paths-ignore:
- README.md
- 'docs/**'

jobs:
test:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version-file: "go.mod"
cache: true

- name: Tests
run: |
make build lint

0 comments on commit 0797630

Please sign in to comment.