-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split GHA workflows into separate CI / release
- Loading branch information
Showing
4 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- go.mod | ||
- go.sum | ||
- '**.go' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Git Config for Unit Tests | ||
run: | | ||
git config --global user.email ci | ||
git config --global user.name ci | ||
git config --global init.defaultBranch main | ||
- name: Run Unit Tests | ||
run: | | ||
make test | ||
- name: Build binary | ||
run: | | ||
make build | ||
chmod +x ./autotag/autotag | ||
- name: Autotag Merge Commit | ||
# TODO: replace this with GitHub Action after #41 | ||
run: | | ||
./autotag/autotag | ||
echo "tags:" && git tag -l | ||
- name: Install rpm | ||
run: | | ||
sudo apt-get -qqy update && sudo apt-get -qqy install rpm | ||
- name: Deploy Autotag Release | ||
# TODO(vtopc): switch to the `goreleaser/goreleaser-action` GHA? | ||
run: | | ||
curl -sL https://git.io/goreleaser | bash -s -- --parallelism=2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters