chore: move to environment secrets (#2653)

* chore: move to environment secrets

* fix: secrets based on feedback

* fix: name of token

* fix: add 'promote' environment

* ci: change unit test format
This commit is contained in:
Casey Lee
2025-02-09 14:37:02 -08:00
committed by GitHub
parent 89755d3f25
commit c2409db605
4 changed files with 22 additions and 43 deletions

View File

@@ -4,10 +4,15 @@ on:
tags:
- v*
permissions:
contents: write
actions: write
jobs:
release:
name: release
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
with:
@@ -15,21 +20,13 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- uses: actions/cache@v4
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Winget
uses: vedantmgoyal2009/winget-releaser@v2
with:
@@ -45,7 +42,7 @@ jobs:
- name: GitHub CLI extension
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
github-token: ${{ secrets.GH_ACT_TOKEN }}
script: |
const mainRef = (await github.rest.git.getRef({
owner: 'nektos',