3d0cb3d82b
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: release
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
release:
|
|
name: release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
- uses: actions/cache@v3
|
|
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 }}
|
|
- name: Winget
|
|
uses: vedantmgoyal2009/winget-releaser@v2
|
|
with:
|
|
identifier: nektos.act
|
|
installers-regex: '_Windows_\w+\.zip$'
|
|
token: ${{ secrets.WINGET_TOKEN }}
|
|
- name: Chocolatey
|
|
uses: ./.github/actions/choco
|
|
with:
|
|
version: ${{ github.ref }}
|
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
|
push: true
|
|
- name: GitHub CLI extension
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
|
script: |
|
|
const mainRef = (await github.rest.git.getRef({
|
|
owner: 'nektos',
|
|
repo: 'gh-act',
|
|
ref: 'heads/main',
|
|
})).data;
|
|
console.log(mainRef);
|
|
github.rest.git.createRef({
|
|
owner: 'nektos',
|
|
repo: 'gh-act',
|
|
ref: context.ref,
|
|
sha: mainRef.object.sha,
|
|
});
|