forked from notaryproject/notation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add weekly release (notaryproject#282)
Signed-off-by: Junjie Gao <[email protected]>
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 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,31 @@ | ||
builds: | ||
- main: ./cmd/notation | ||
id: notation | ||
binary: notation | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ignore: | ||
- goos: windows | ||
goarch: arm64 | ||
ldflags: | ||
- -s -w -X {{.ModulePath}}/internal/version.Version={{.Version}} -X {{.ModulePath}}/internal/version.BuildMetadata= | ||
archives: | ||
- format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE | ||
release: | ||
prerelease: true | ||
header: | | ||
## Notation Weekly Dev Build ({{ .Date }}) | ||
Welcome to this Weekly Dev Build! |
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,43 @@ | ||
name: dev-release | ||
|
||
on: | ||
schedule: | ||
- cron: '0 16 * * 0' # at 16:00 on Sunday (UTC) | ||
|
||
jobs: | ||
build: | ||
name: Weekly Release Notation Binaries | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
go-version: [1.18] | ||
fail-fast: true | ||
steps: | ||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set Git User | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Create Version Tag | ||
run: | | ||
# get project version: <SemVer>.dev.<YYYYMMDD> | ||
export TAG_VERSION=`cat ./internal/version/version.go | grep "Version = " | awk -F '"' '{print $2}'`.dev.`date +%Y%m%d` | ||
# create new tag | ||
git tag -af $TAG_VERSION -m "For weekly build" | ||
git push origin $TAG_VERSION | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release -f ./.dev.goreleaser.yml --rm-dist | ||
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