Skip to content

Commit

Permalink
make workflow to run when stable and pre-releases publish (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
narcis96 committed Apr 23, 2024
1 parent bfac797 commit 231b9ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
name: Unit Test
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
Expand All @@ -46,10 +46,10 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ name: Release

on:
release:
types: [created]
types: [published]

jobs:
publish-capi-yamls:
if: startsWith(github.ref, 'refs/tags/v') == true
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: write
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version-file: "go.mod"
cache: false
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/v!!p')
Expand All @@ -39,9 +40,9 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-images:
if: startsWith(github.ref, 'refs/tags/v') == true
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
Expand Down Expand Up @@ -78,10 +79,10 @@ jobs:
publish-release:
if: startsWith(github.ref, 'refs/tags/v') == true
needs: [publish-images]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 300
- id: get_version
Expand Down

0 comments on commit 231b9ca

Please sign in to comment.