Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9c9a583974
commit
a5b65dd406
@@ -32,7 +32,6 @@ Deploy repo, after the deploy job:
|
||||
with: { fetch-depth: 0 }
|
||||
- uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
image: git.extant2000.com/extant2000/<image>
|
||||
registry-token: ${{ secrets.REGISTRY_TOKEN }}
|
||||
```
|
||||
@@ -42,11 +41,10 @@ Library, after the tests:
|
||||
```yaml
|
||||
- uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
npm-token: ${{ secrets.NPM_TOKEN }}
|
||||
```
|
||||
|
||||
`RELEASE_TOKEN` is an org secret (extant2000git, write:repository). Outputs:
|
||||
The job token (`gitea.token`) creates the tag and the release; no extra secret. Outputs:
|
||||
`released`, `version`, `tag`, `previous`.
|
||||
|
||||
## Versioning
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ description: >
|
||||
pushes IMAGE:vX.Y.Z and publishes the npm package as X.Y.Z.
|
||||
inputs:
|
||||
token:
|
||||
description: Gitea token that can create tags and releases in this repo.
|
||||
required: true
|
||||
description: Gitea token that can create tags and releases in this repo (the job token can).
|
||||
default: ${{ github.token }}
|
||||
sha:
|
||||
description: Commit to release.
|
||||
default: ${{ github.sha }}
|
||||
@@ -50,7 +50,7 @@ runs:
|
||||
- id: release
|
||||
shell: bash
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ inputs.token }}
|
||||
RELEASE_TOKEN: ${{ inputs.token || github.token }}
|
||||
SHA: ${{ inputs.sha }}
|
||||
INITIAL_VERSION: ${{ inputs.initial-version }}
|
||||
VERSION_FILE: ${{ inputs.version-file }}
|
||||
|
||||
@@ -9,7 +9,7 @@ export GIT_AUTHOR_NAME=t GIT_AUTHOR_EMAIL=t@example.com GIT_COMMITTER_NAME=t GIT
|
||||
|
||||
repo() { D=$(mktemp -d); cd "$D" && git init -q -b main && git commit -q --allow-empty -m "chore: init"; }
|
||||
c() { git commit -q --allow-empty -m "$1"; }
|
||||
run() { ( unset GITHUB_OUTPUT; DRY_RUN=1 SKIP_FETCH=1 GITHUB_REPOSITORY=o/r "$@" bash "$SCRIPT" 2>"$D/.err" ); }
|
||||
run() { ( unset GITHUB_OUTPUT GITHUB_SHA SHA GITHUB_REPOSITORY; DRY_RUN=1 SKIP_FETCH=1 GITHUB_REPOSITORY=o/r "$@" bash "$SCRIPT" 2>"$D/.err" ); }
|
||||
expect() { # name expected-released expected-version [env...]
|
||||
local name=$1 rel=$2 ver=$3 out; shift 3
|
||||
out=$(run env "$@")
|
||||
|
||||
Reference in New Issue
Block a user