-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.28 KB
/
release.yml
File metadata and controls
39 lines (39 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sync manifest to registry
if: success() && env.GH_TOKEN != ''
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.REGISTRY_PAT }}
run: |
git clone https://x-access-token:${GH_TOKEN}@github.com/GoCodeAlone/workflow-registry.git /tmp/registry
mkdir -p /tmp/registry/plugins/okta
TAG=${GITHUB_REF#refs/tags/}
VERSION=${TAG#v}
jq --arg v "$VERSION&
34A5
quot; '.version = $v' plugin.json > /tmp/registry/plugins/okta/manifest.json
cd /tmp/registry
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add plugins/okta/manifest.json
git diff --cached --quiet || git commit -m "chore: sync okta plugin manifest v${VERSION}"
git push