-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped versions of stuff, renamed some things; Added GitHub release automation on tags push.
- Loading branch information
Showing
2 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
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,62 @@ | ||
name: Build on ubuntu and maybe release | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
env: | ||
RELEASE_OS: ubuntu-24.04 | ||
RELEASE_GOVER: "1.22" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ] | ||
gover: [ "1.22", "1.21", 1.20" ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
go-version: ${{ matrix.gover }} | ||
- uses: actions/checkout@v4 | ||
- name: Build the project | ||
run: go build . | ||
- name: Save built binary | ||
if: startsWith(github.ref, 'refs/tags/') && ${{ matrix.os }} == ${{ env.RELEASE_OS }} && ${{ matrix.gover }} == ${{ env.RELEASE_GOVER }} | ||
uses: actions/upload-artificat@v4 | ||
with: | ||
name: docker-on-top | ||
path: ./docker-on-top | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
release: | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare release notes | ||
run: | | ||
# Assert that the changelog begins with this release | ||
head -1 CHANGELOG.md | grep -E "^# ${{ github.ref_name }}$" | ||
# Extract the part of changelog for this release (until next first-level heading) | ||
tail -n +2 CHANGELOG.md | sed '/^# /q' | head -n-1 > this-changelog.md | ||
- name: Restore built binary | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docker-on-top | ||
path: ./docker-on-top | ||
- name: Release new version | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: ${{ github.workspace }}/this-changelog.md | ||
files: | | ||
./docker-on-top | ||
./docker-on-top.service |
This file was deleted.
Oops, something went wrong.