mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
ci: improve release workflow by adding task installation step
This commit is contained in:
parent
9787394d5a
commit
0cf308016b
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@ -37,6 +37,15 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install GoReleaser
|
||||
run: curl -sfL https://goreleaser.com/static/run | DISTRIBUTION=pro VERSION=v2.5.0 bash -s -- check
|
||||
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
|
@ -166,7 +166,7 @@ release:
|
||||
github:
|
||||
owner: onsonr
|
||||
name: sonr
|
||||
name_template: 'Release {{ time "2006" }}.{{ time "02" | int }}.{{ time "Monday" | int }}'
|
||||
name_template: 'Release {{ .Env.RELEASE_DATE }}'
|
||||
draft: false
|
||||
replace_existing_draft: true
|
||||
replace_existing_artifacts: true
|
||||
|
19
Taskfile.yml
19
Taskfile.yml
@ -55,3 +55,22 @@ tasks:
|
||||
cmds:
|
||||
- task: procs:down
|
||||
|
||||
date:
|
||||
desc: Returns date in YEAR.WEEK.DAY format
|
||||
cmds:
|
||||
- |
|
||||
YEAR=$(date +%Y)
|
||||
WEEK=$(date +%V)
|
||||
DAY=$(date +%u)
|
||||
echo "${YEAR}.${WEEK}.${DAY}"
|
||||
vars:
|
||||
DATE: '{{default "" .CLI_ARGS}}'
|
||||
silent: true
|
||||
|
||||
release:
|
||||
desc: Create a new release with formatted date
|
||||
cmds:
|
||||
- curl -sfL https://goreleaser.com/static/run | DISTRIBUTION=pro VERSION=v{{.VERSION}} bash -s -- check
|
||||
- RELEASE_DATE=$(task date) goreleaser release --clean
|
||||
silent: true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user