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

chore: update release process to allow RCs #94

Merged
merged 1 commit into from
May 22, 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
7 changes: 1 addition & 6 deletions .github/actions/save-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ description: "Save debug logs"
runs:
using: composite
steps:
- name: Fix log permissions
run: |
sudo chown $USER /tmp/runner-*.log || echo ""
shell: bash

- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: debug-log
path: /tmp/runner-*.log
path: /tmp/maru-*.log
21 changes: 17 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
run: |
chmod +x build/maru

- name: Run unit tests
run: |
make test-unit

- name: Run e2e tests
run: |
make test-e2e
Expand Down Expand Up @@ -90,13 +94,22 @@ jobs:
name: build-artifacts
path: build/

- name: Skip brew latest for pre-release tags
run: |
if [[ $GITHUB_REF_NAME == *"rc"* ]]; then
echo "BREW_NAME=maru@latest-rc" >> $GITHUB_ENV
else
echo "BREW_NAME=maru" >> $GITHUB_ENV
fi

- name: Get Brew tap repo token
id: brew-tap-token
uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0
uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0
with:
application_id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }}
application_private_key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }}
organization: defenseunicorns
app-id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }}
private-key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }}
owner: defenseunicorns
repositories: homebrew-tap

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
Expand Down
22 changes: 19 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,22 @@ changelog:
use: github-native

brews:
- name: maru
- name: "{{ .Env.BREW_NAME }}"
repository:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap

commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/maru-runner"
description: "CLI for Unicorn Delivery Service"
description: "The Unicorn Task Runner"

# NOTE: We are using .Version instead of .Tag because homebrew has weird semver parsing rules and won't be able to
# install versioned releases that has a `v` character before the version number.
Expand All @@ -60,9 +68,17 @@ brews:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap

commit_msg_template: "Brew formula update for {{ .ProjectName }} versioned release {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/maru-runner"
description: "unicorn-flavored build tool"
description: "The Unicorn Task Runner"

# Generate a GitHub release and publish the release for the tag
release:
Expand Down
Loading