Skip to content

Commit

Permalink
ci: Make release workflow automatic
Browse files Browse the repository at this point in the history
* Set GITHUB_TOKEN env var in release workflow

* Cross compile for all archs in release

Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Jan 22, 2024
1 parent 1d199fb commit d1e2c64
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
name: Release

on:
push:
# Run workflow on new tags
tags:
- "v.*"
workflow_dispatch:
inputs:
skip-tests:
type: boolean
description: Skip
default: false
- 'v*'

permissions:
contents: read

jobs:
test-lint:
uses: ./.github/workflows/step_tests-lint.yml
if: !inputs.skip-tests

test-unit:
needs: [test-lint]
uses: ./.github/workflows/step_tests-unit.yml
if: !inputs.skip-tests

test-e2e:
needs: [test-lint]
uses: ./.github/workflows/step_tests-e2e.yml
if: !inputs.skip-tests

build:
needs: [test-unit, test-e2e]
Expand All @@ -37,6 +30,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -56,6 +51,14 @@ jobs:
run: |
docker version
docker run --privileged linuxkit/binfmt:v0.8
- name: Cross compile Go packages
run: promu --config .promu-go.yml crossbuild -v

- name: Cross compile CGo packages
run: |
sed -i -e 's/CGO_BUILD ?= 0/CGO_BUILD ?= 1/g' Makefile
promu --config .promu-cgo.yml crossbuild -v
- name: Publish release
run: |
Expand Down

0 comments on commit d1e2c64

Please sign in to comment.