Skip to content

Commit

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

* Update workflows to go-auto-release
  • Loading branch information
goruha authored Apr 24, 2024
1 parent 49145e3 commit 670c98d
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 130 deletions.
54 changes: 0 additions & 54 deletions .github/auto-release.yml

This file was deleted.

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

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/docker-promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker Promote

on:
push:
tags:
- "*"

permissions:
contents: read
packages: write

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

jobs:
ci-docker:
runs-on: ubuntu-latest
steps:
- uses: cloudposse/[email protected]
id: promote
with:
registry: ghcr.io
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
from: sha-${{ github.sha }}
to: ${{ github.event.release.tag_name }}
use_metadata: false
25 changes: 0 additions & 25 deletions .github/workflows/docker.yml

This file was deleted.

57 changes: 50 additions & 7 deletions .github/workflows/feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,73 @@ on:
- synchronize
- reopened

push:
branches:
- main
- release/v*
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'

permissions:
contents: read
packages: write

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

jobs:
build:
ci-go:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version-file: go.mod

- name: Test Snapshot Release
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
args: release --config ./dev.goreleaser.yaml --clean --snapshot

- name: Upload Test Release Assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: github-status-updater
path: dist/*
retention-days: 3

ci-docker:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v4

- name: Build
id: build
uses: cloudposse/[email protected]
with:
registry: ghcr.io
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64

release:
if: github.event_name == 'push'
needs: [ci-go, ci-docker]
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main
with:
publish: true
secrets: inherit
37 changes: 9 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
name: Release

on:
workflow_dispatch:

release:
types:
- published
types: [published]

permissions:
contents: write
permissions: {}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: Public Release
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
perform:
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
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
- uses: mszostok/[email protected]
if: github.event.pull_request.head.repo.full_name == github.repository
name: "Full check of CODEOWNERS"
Expand Down
File renamed without changes.

0 comments on commit 670c98d

Please sign in to comment.