Skip to content

Commit

Permalink
Go auto release workflows (#383)
Browse files Browse the repository at this point in the history
* Update workflows to go-auto-release

* Update workflows to go-auto-release

* Update workflows to go-auto-release

* Update workflows to go-auto-release

* Update workflows to go-auto-release

* Update workflows to go-auto-release

* Update workflows to go-auto-release
  • Loading branch information
goruha authored Apr 23, 2024
1 parent f9b77a6 commit 4071d4c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 176 deletions.
53 changes: 0 additions & 53 deletions .github/auto-release.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/auto-release.yml

This file was deleted.

46 changes: 11 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,15 @@
# This GitHub action publish assets for release when a tag is created.
name: release
name: Release
on:
push:
tags:
- "*"
release:
types: [published]

workflow_dispatch:
permissions: {}

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Unshallow
run: git fetch --prune --unshallow

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --parallelism 2 --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
perform:
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
secrets: inherit
43 changes: 30 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ on:
types: [opened, synchronize, reopened]
paths-ignore:
- "README.md"
release:
types: [created]
push:
branches:
- main
- release/v*
paths-ignore:
- "README.md"
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
# ensure the code builds...
Expand All @@ -16,15 +25,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3.3.0
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: go.mod
id: go

- name: Check out code into the Go module directory
uses: actions/[email protected]

- name: Get dependencies
run: |
go mod download
Expand All @@ -50,15 +59,15 @@ jobs:
- "1.5.7"
- "1.6.3"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3.3.0
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: go.mod
id: go

- name: Check out code into the Go module directory
uses: actions/[email protected]

- name: Get dependencies
run: |
make deps
Expand All @@ -70,3 +79,11 @@ jobs:
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
run: |
make testacc
release:
needs: test
if: github.event_name == 'push'
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main
with:
publish: true
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/validate-codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v2
uses: actions/checkout@v4
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved
- uses: mszostok/[email protected]
if: github.event.pull_request.head.repo.full_name == github.repository
Expand Down
59 changes: 0 additions & 59 deletions .goreleaser.yml

This file was deleted.

0 comments on commit 4071d4c

Please sign in to comment.