Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go auto release workflows #25

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/github-action-docker-promote@0.3.0
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/github-action-docker-build-push@1.15.1
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/codeowners-validator@v0.7.1
if: github.event.pull_request.head.repo.full_name == github.repository
name: "Full check of CODEOWNERS"
Expand Down
File renamed without changes.