Skip to content

Commit

Permalink
ci: Make release workflow automatic
Browse files Browse the repository at this point in the history
* Download artifacts before publish step

* Set GITHUB_TOKEN env var in release workflow

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
  • Loading branch information
mahendrapaipuri committed Jan 22, 2024
1 parent 1d199fb commit 1a3d5e7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 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,12 @@ jobs:
run: |
docker version
docker run --privileged linuxkit/binfmt:v0.8
- name: Download go build artifacts
uses: actions/download-artifact@v3
with:
name: build-go-artifacts
path: .build

- name: Publish release
run: |
Expand Down

0 comments on commit 1a3d5e7

Please sign in to comment.