Add the Makefile and the release workflow.
This commit is contained in:
1 parent
15a34e1f84
commit
4593218996
6 files changed
+305
-1
No files matched your search
@@ -0,0 +1,35 @@
|
||||
# Builds dibs for every v* tag and publishes it as a release with the binaries for Linux
|
||||
# (amd64), Windows (amd64) and macOS (arm64) attached (the Makefile's TARGETS), so
|
||||
# .../releases/download/latest/dibs-<os>-<arch> always serves the newest one.
|
||||
# Pre-release tags (containing "-") and tags on commits that are not on master are built and
|
||||
# tested but not released (see ci/release.sh).
|
||||
# Uses the repository secret RELEASE_TOKEN (a token with "repository: Read and Write") when it
|
||||
# exists, else the job's automatic token.
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
# release.sh reads the v* tag on HEAD and checks that HEAD is on origin/master
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
# The build runs without the token; only the publish step gets it.
|
||||
- name: Build
|
||||
run: ci/release.sh build
|
||||
|
||||
- name: Publish
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.GITEA_TOKEN }}
|
||||
run: ci/release.sh publish
|
||||
Reference in new issue
Block a user