mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-16 15:40:34 +00:00
Compare commits
118 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cc7ebb73d | ||
|
|
702f5f91c9 | ||
|
|
1a80836c5c | ||
|
|
a71152e827 | ||
|
|
4c6ab561ad | ||
|
|
4f96abf297 | ||
|
|
15fa2a96d4 | ||
|
|
e24998b8b6 | ||
|
|
be2e8a39ba | ||
|
|
5e53f8eea2 | ||
|
|
4068afa2f0 | ||
|
|
213ec80f56 | ||
|
|
4b462d3d1d | ||
|
|
01cbe076be | ||
|
|
2a473d70e3 | ||
|
|
fdcf0b9df9 | ||
|
|
9881cc5376 | ||
|
|
07f3f34e99 | ||
|
|
47f0a77cfc | ||
|
|
4be059cded | ||
|
|
6c92f1d350 | ||
|
|
ff4cb9c029 | ||
|
|
ec59f474b9 | ||
|
|
752dedee3d | ||
|
|
1881ae035d | ||
|
|
fdc5e662bb | ||
|
|
51b5b35c3c | ||
|
|
4247c53b30 | ||
|
|
c169bfd5ae | ||
|
|
902ab4a70d | ||
|
|
c59a691319 | ||
|
|
56cc8b2737 | ||
|
|
78265e466a | ||
|
|
4c34bd9582 | ||
|
|
aacbb7ffbc | ||
|
|
d31d51ab55 | ||
|
|
f3511a2bf5 | ||
|
|
9cf36111e7 | ||
|
|
43039ef35c | ||
|
|
89b8235a3e | ||
|
|
aab47043d0 | ||
|
|
a08664b80c | ||
|
|
35b9a27f96 | ||
|
|
e435ccd777 | ||
|
|
2ff5850a92 | ||
|
|
9a6cd01b33 | ||
|
|
a386515f0c | ||
|
|
ca48102d58 | ||
|
|
0931acf1f7 | ||
|
|
90c43f2c19 | ||
|
|
9c156ee8a1 | ||
|
|
73c477b761 | ||
|
|
19c00a97d6 | ||
|
|
90a3faa9d0 | ||
|
|
0262998728 | ||
|
|
450d3a4bd2 | ||
|
|
25b92abef8 | ||
|
|
bc0ac76346 | ||
|
|
842e7ccd3e | ||
|
|
d28c98212f | ||
|
|
9ed2f89a66 | ||
|
|
cf63508052 | ||
|
|
f7623f3e71 | ||
|
|
006a7a4111 | ||
|
|
e4066e695c | ||
|
|
22f558e822 | ||
|
|
6e33108d10 | ||
|
|
7ca645047c | ||
|
|
d33b6f6aea | ||
|
|
85d0b9d4cd | ||
|
|
286f3b13b1 | ||
|
|
beac410314 | ||
|
|
18bbabc70c | ||
|
|
5742e2a039 | ||
|
|
70ccc5d2da | ||
|
|
d55bec790d | ||
|
|
f1dbd532c3 | ||
|
|
2953d07480 | ||
|
|
62d4b8ad34 | ||
|
|
f09f1a7bee | ||
|
|
9937f9bad9 | ||
|
|
b7f6f16d51 | ||
|
|
c21f56a7bc | ||
|
|
696b757ee8 | ||
|
|
94b86e1b02 | ||
|
|
d50b0c42ee | ||
|
|
14707cd26f | ||
|
|
e0e636a951 | ||
|
|
e03329bcfe | ||
|
|
72088715cb | ||
|
|
44dd9927f4 | ||
|
|
9d3b418705 | ||
|
|
7d864bed1f | ||
|
|
7ec5c2b0c6 | ||
|
|
3529a650d2 | ||
|
|
d2f6e33a35 | ||
|
|
5fdedb94ab | ||
|
|
81d9ad7185 | ||
|
|
a10d0e32dc | ||
|
|
3fa32b8bb5 | ||
|
|
c7c9447c79 | ||
|
|
920a7cbd0a | ||
|
|
336e29918d | ||
|
|
37247345b4 | ||
|
|
f424e9de13 | ||
|
|
7e0ddfe79f | ||
|
|
cffc4af7bf | ||
|
|
08e23ccf3b | ||
|
|
d756366df6 | ||
|
|
0c7e252c3a | ||
|
|
347176ca37 | ||
|
|
2fce7c4986 | ||
|
|
1d44853e58 | ||
|
|
45b37916b0 | ||
|
|
97503b1435 | ||
|
|
eeac89f426 | ||
|
|
8f389eacd3 | ||
|
|
f82d6c1c34 |
39 changed files with 7120 additions and 4889 deletions
|
|
@ -1,2 +1,12 @@
|
||||||
/coverage
|
/coverage
|
||||||
/node_modules
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
|
||||||
3
.eslintignore
Normal file
3
.eslintignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
/dist/**
|
||||||
|
/coverage/**
|
||||||
|
/node_modules/**
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"node": true,
|
"node": true,
|
||||||
"es2021": true,
|
"es6": true,
|
||||||
"jest/globals": true
|
"jest": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:jest/recommended",
|
"plugin:jest/recommended",
|
||||||
"plugin:prettier/recommended"
|
"plugin:prettier/recommended"
|
||||||
|
|
|
||||||
4
.gitattributes
vendored
4
.gitattributes
vendored
|
|
@ -1,2 +1,2 @@
|
||||||
/dist/** linguist-generated=true
|
/dist/** linguist-generated=true -diff
|
||||||
/lib/** linguist-generated=true
|
/lib/** linguist-generated=true -diff
|
||||||
|
|
|
||||||
22
.github/dependabot.yml
vendored
22
.github/dependabot.yml
vendored
|
|
@ -3,18 +3,28 @@ updates:
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: monthly
|
||||||
time: "06:00"
|
|
||||||
timezone: "Europe/Paris"
|
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci"
|
||||||
|
include: "scope"
|
||||||
|
groups:
|
||||||
|
actions:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: monthly
|
||||||
time: "06:00"
|
|
||||||
timezone: "Europe/Paris"
|
|
||||||
allow:
|
allow:
|
||||||
- dependency-type: "production"
|
- dependency-type: "production"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
|
commit-message:
|
||||||
|
prefix: "chore"
|
||||||
|
include: "scope"
|
||||||
|
groups:
|
||||||
|
npm:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
|
|
|
||||||
170
.github/workflows/ci.yml
vendored
170
.github/workflows/ci.yml
vendored
|
|
@ -1,8 +1,16 @@
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 10 * * *' # everyday at 10am
|
- cron: '0 10 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
@ -11,9 +19,6 @@ on:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'releases/v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|
@ -23,34 +28,30 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macOS-latest
|
- macos-latest
|
||||||
- windows-latest
|
- windows-latest
|
||||||
version:
|
version:
|
||||||
- latest
|
- latest
|
||||||
- '~> 0.182'
|
- '~> 2.13'
|
||||||
distribution:
|
distribution:
|
||||||
- goreleaser
|
- goreleaser
|
||||||
- goreleaser-pro
|
- goreleaser-pro
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Set up Go
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: stable
|
||||||
-
|
- name: Check
|
||||||
name: Check
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
args: check --debug
|
args: check --verbose
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
-
|
- name: GoReleaser
|
||||||
name: GoReleaser
|
|
||||||
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
||||||
uses: ./
|
uses: ./
|
||||||
env:
|
env:
|
||||||
|
|
@ -58,7 +59,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
args: release --skip-publish --rm-dist --snapshot
|
args: release --skip=publish --clean --snapshot
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
|
|
||||||
install-only:
|
install-only:
|
||||||
|
|
@ -68,34 +69,36 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- latest
|
- latest
|
||||||
- '~> 0.166'
|
- '~> 2.13'
|
||||||
distribution:
|
distribution:
|
||||||
- goreleaser
|
- goreleaser
|
||||||
- goreleaser-pro
|
- goreleaser-pro
|
||||||
|
cosign:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Set up Go
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
-
|
- name: Install cosign
|
||||||
name: GoReleaser
|
if: matrix.cosign
|
||||||
|
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
|
||||||
|
- name: GoReleaser
|
||||||
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
install-only: true
|
install-only: true
|
||||||
-
|
- name: Check
|
||||||
name: Check
|
|
||||||
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }}
|
||||||
run: |
|
run: |
|
||||||
goreleaser check --debug
|
goreleaser check --verbose
|
||||||
|
|
||||||
signing:
|
signing:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
@ -105,41 +108,36 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macOS-latest
|
- macos-latest
|
||||||
- windows-latest
|
- windows-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Set up Go
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
-
|
- name: Import GPG key
|
||||||
name: Import GPG key
|
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v5
|
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE_TEST }}
|
passphrase: ${{ secrets.PASSPHRASE_TEST }}
|
||||||
-
|
- name: Check
|
||||||
name: Check
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: -f .goreleaser-signing.yml check --debug
|
args: -f .goreleaser-signing.yml check --verbose
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
env:
|
env:
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||||
-
|
- name: GoReleaser
|
||||||
name: GoReleaser
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: -f .goreleaser-signing.yml release --skip-publish --rm-dist --snapshot
|
args: -f .goreleaser-signing.yml release --skip=publish --clean --snapshot
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
env:
|
env:
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||||
|
|
@ -147,31 +145,26 @@ jobs:
|
||||||
upload-artifact:
|
upload-artifact:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Set up Go
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
-
|
- name: Check
|
||||||
name: Check
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
args: check --debug
|
args: check --verbose
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
-
|
- name: GoReleaser
|
||||||
name: GoReleaser
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
args: release --skip-publish --rm-dist --snapshot
|
args: release --skip=publish --clean --snapshot
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
-
|
- name: Upload assets
|
||||||
name: Upload assets
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: myapp
|
name: myapp
|
||||||
path: ./test/dist/*
|
path: ./test/dist/*
|
||||||
|
|
@ -179,23 +172,54 @@ jobs:
|
||||||
dist:
|
dist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Set up Go
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
-
|
- name: GoReleaser
|
||||||
name: GoReleaser
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
args: release --config .goreleaser-dist.yml --skip-publish --rm-dist --snapshot
|
args: release --config .goreleaser-dist.yml --skip=publish --clean --snapshot
|
||||||
workdir: ./test
|
workdir: ./test
|
||||||
-
|
- name: Check dist
|
||||||
name: Check dist
|
|
||||||
run: |
|
run: |
|
||||||
tree -nh ./test/_output
|
tree -nh ./test/_output
|
||||||
|
|
||||||
|
nightly:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- macos-latest
|
||||||
|
- windows-latest
|
||||||
|
distribution:
|
||||||
|
- goreleaser-pro
|
||||||
|
- goreleaser
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
- name: GoReleaser
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
install-only: true
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
version: nightly
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Check
|
||||||
|
run: |
|
||||||
|
goreleaser check -f ./test/.goreleaser.yml
|
||||||
|
goreleaser --version
|
||||||
|
goreleaser --version | grep nightly
|
||||||
|
|
|
||||||
42
.github/workflows/release-major-tag.yml
vendored
Normal file
42
.github/workflows/release-major-tag.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: release major tag
|
||||||
|
|
||||||
|
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
target:
|
||||||
|
description: The tag, branch, or SHA the major version should point to (e.g. v7.1.0)
|
||||||
|
required: true
|
||||||
|
major_version:
|
||||||
|
type: choice
|
||||||
|
description: The major version tag to move
|
||||||
|
options:
|
||||||
|
- v7
|
||||||
|
- v6
|
||||||
|
- v5
|
||||||
|
- v4
|
||||||
|
- v3
|
||||||
|
- v2
|
||||||
|
- v1
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Git config
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
- name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
|
||||||
|
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
|
||||||
|
- name: Push
|
||||||
|
run: git push origin ${{ github.event.inputs.major_version }} --force
|
||||||
42
.github/workflows/test.yml
vendored
42
.github/workflows/test.yml
vendored
|
|
@ -1,38 +1,42 @@
|
||||||
name: test
|
name: test
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'releases/v*'
|
- 'releases/v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'releases/v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Setup Node.js
|
||||||
name: Validate
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
uses: docker/bake-action@v2
|
|
||||||
with:
|
with:
|
||||||
targets: validate
|
node-version-file: '.node-version'
|
||||||
-
|
cache: npm
|
||||||
name: Test
|
- name: Install cosign
|
||||||
uses: docker/bake-action@v2
|
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
|
||||||
with:
|
- name: Install dependencies
|
||||||
targets: test
|
run: npm ci
|
||||||
|
- name: Test
|
||||||
|
run: npm test
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
- name: Upload coverage
|
||||||
name: Upload coverage
|
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
with:
|
||||||
file: ./coverage/clover.xml
|
files: ./coverage/clover.xml
|
||||||
|
|
|
||||||
83
.github/workflows/validate.yml
vendored
Normal file
83
.github/workflows/validate.yml
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
name: validate
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'releases/v*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: npm
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Format check
|
||||||
|
run: npm run format-check
|
||||||
|
- name: Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: npm
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
- name: Rebuild dist
|
||||||
|
run: npm run build
|
||||||
|
- name: Compare dist
|
||||||
|
id: diff
|
||||||
|
run: |
|
||||||
|
if [ "$(git diff --ignore-space-at-eol dist | wc -l)" -gt "0" ]; then
|
||||||
|
echo "Detected uncommitted changes after build. Run 'npm run build' and commit dist/." >&2
|
||||||
|
git diff dist
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Upload built dist on failure
|
||||||
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
vendor:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: npm
|
||||||
|
- name: Refresh package-lock.json
|
||||||
|
run: npm install --package-lock-only
|
||||||
|
- name: Compare package-lock.json
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git status --porcelain -- package-lock.json)" ]; then
|
||||||
|
echo "package-lock.json is out of sync with package.json. Run 'npm install' and commit." >&2
|
||||||
|
git diff package-lock.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
71
.gitignore
vendored
71
.gitignore
vendored
|
|
@ -1,19 +1,11 @@
|
||||||
/.dev
|
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
|
||||||
node_modules/
|
|
||||||
lib
|
|
||||||
|
|
||||||
# Jetbrains
|
|
||||||
/.idea
|
|
||||||
/*.iml
|
|
||||||
|
|
||||||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
@ -24,34 +16,14 @@ pids
|
||||||
*.seed
|
*.seed
|
||||||
*.pid.lock
|
*.pid.lock
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
*.lcov
|
*.lcov
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# TypeScript cache
|
# TypeScript cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
|
@ -61,36 +33,11 @@ typings/
|
||||||
# Optional eslint cache
|
# Optional eslint cache
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
# dotenv environment variable files
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
|
||||||
.yarn-integrity
|
|
||||||
|
|
||||||
# dotenv environment variables file
|
|
||||||
.env
|
.env
|
||||||
.env.test
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
.env.production.local
|
||||||
.cache
|
.env.local
|
||||||
|
provenance.json
|
||||||
# next.js build output
|
|
||||||
.next
|
|
||||||
|
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless/
|
|
||||||
|
|
||||||
# FuseBox cache
|
|
||||||
.fusebox/
|
|
||||||
|
|
||||||
# DynamoDB Local files
|
|
||||||
.dynamodb/
|
|
||||||
|
|
|
||||||
15
.kodiak.toml
15
.kodiak.toml
|
|
@ -1,15 +0,0 @@
|
||||||
version = 1
|
|
||||||
|
|
||||||
[merge]
|
|
||||||
automerge_label = "automerge"
|
|
||||||
blacklist_title_regex = "^WIP.*"
|
|
||||||
method = "squash"
|
|
||||||
delete_branch_on_merge = true
|
|
||||||
block_on_reviews_requested = false
|
|
||||||
notify_on_conflict = true
|
|
||||||
optimistic_updates = true
|
|
||||||
|
|
||||||
[merge.message]
|
|
||||||
title = "pull_request_title"
|
|
||||||
include_pr_number = true
|
|
||||||
body_type = "markdown"
|
|
||||||
1
.node-version
Normal file
1
.node-version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
24
|
||||||
6
.prettierignore
Normal file
6
.prettierignore
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/
|
||||||
89
CONTRIBUTING.md
Normal file
89
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
# Contributing
|
||||||
|
|
||||||
|
Thanks for your interest in contributing!
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- [Node.js](https://nodejs.org/) — version pinned in [`.node-version`](./.node-version).
|
||||||
|
Tools like [`nvm`](https://github.com/nvm-sh/nvm), [`fnm`](https://github.com/Schniz/fnm),
|
||||||
|
[`asdf`](https://asdf-vm.com/), or [`mise`](https://mise.jdx.dev/) read this file
|
||||||
|
automatically.
|
||||||
|
- [`cosign`](https://docs.sigstore.dev/cosign/installation/) — only required if you
|
||||||
|
want to run the signature-verification integration tests locally.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm ci
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pre-commit checklist
|
||||||
|
|
||||||
|
Before committing changes to `src/`, `__tests__/`, `package.json`,
|
||||||
|
`package-lock.json`, or `action.yml`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run pre-checkin
|
||||||
|
```
|
||||||
|
|
||||||
|
That runs `format` + `build` + `test` — the same checks CI runs.
|
||||||
|
|
||||||
|
Then commit `dist/` along with your source changes; the action runtime loads
|
||||||
|
`dist/index.js` directly, so it must stay in sync.
|
||||||
|
|
||||||
|
If CI's `validate / build` job fails because `dist/` differs from a fresh
|
||||||
|
build, just download the `dist` artifact from the failed run and commit it —
|
||||||
|
or rerun `npm run build` locally with the Node version in `.node-version`.
|
||||||
|
|
||||||
|
## npm scripts
|
||||||
|
|
||||||
|
| Script | Purpose |
|
||||||
|
| ------------------- | ------------------------------------------------ |
|
||||||
|
| `npm run build` | Bundle `src/` to `dist/index.js` via `ncc` |
|
||||||
|
| `npm run format` | Run Prettier (write) |
|
||||||
|
| `npm run format-check` | Run Prettier (check only, used in CI) |
|
||||||
|
| `npm run lint` | Run ESLint (check only, used in CI) |
|
||||||
|
| `npm run lint:fix` | Run ESLint with `--fix` |
|
||||||
|
| `npm test` | Run Jest with coverage |
|
||||||
|
| `npm run pre-checkin` | `format` + `lint:fix` + `build` + `test` |
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
`npm test` runs the full Jest suite, including integration tests that:
|
||||||
|
|
||||||
|
- Download real GoReleaser releases from GitHub
|
||||||
|
- Verify `checksums.txt` against the downloaded archive
|
||||||
|
- Verify the cosign sigstore bundle (skipped if `cosign` isn't on `PATH`,
|
||||||
|
but the CI image always has it installed)
|
||||||
|
|
||||||
|
These need outbound network access. Offline / restrictive-proxy runs will
|
||||||
|
have those tests fail — that's expected.
|
||||||
|
|
||||||
|
## Commit messages
|
||||||
|
|
||||||
|
Use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`,
|
||||||
|
`fix:`, `test:`, `docs:`, `chore:`, `ci:`, …). Keep the subject ≤72 chars.
|
||||||
|
|
||||||
|
## Pull requests
|
||||||
|
|
||||||
|
- Target `master`.
|
||||||
|
- Make sure `npm run pre-checkin` passes.
|
||||||
|
- One logical change per PR is easier to review.
|
||||||
|
- The `signing` CI job and `goreleaser-pro` matrix entries are skipped on PRs
|
||||||
|
from forks because they need repository secrets — that's expected and not
|
||||||
|
something you need to fix.
|
||||||
|
|
||||||
|
## Releasing (maintainers)
|
||||||
|
|
||||||
|
1. Create a new GitHub Release with a semver tag (e.g. `v7.1.0`) — either
|
||||||
|
through the UI or `gh release create v7.1.0 --generate-notes`.
|
||||||
|
2. Once the release exists, run the [**release major tag**](./.github/workflows/release-major-tag.yml)
|
||||||
|
workflow from the Actions tab:
|
||||||
|
- `target`: the new tag (e.g. `v7.1.0`)
|
||||||
|
- `major_version`: the major version to repoint (e.g. `v7`)
|
||||||
|
|
||||||
|
This force-pushes the major tag to the new release so consumers using
|
||||||
|
`goreleaser/goreleaser-action@v7` pick up the change.
|
||||||
|
|
||||||
|
The same workflow doubles as a rollback tool — pass an older tag as
|
||||||
|
`target` to revert the major.
|
||||||
176
README.md
176
README.md
|
|
@ -16,11 +16,11 @@ ___
|
||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Workflow](#workflow)
|
* [Workflow](#workflow)
|
||||||
|
* [Verification](#verification)
|
||||||
* [Run on new tag](#run-on-new-tag)
|
* [Run on new tag](#run-on-new-tag)
|
||||||
* [Signing](#signing)
|
* [Signing](#signing)
|
||||||
* [Upload artifacts](#upload-artifacts)
|
* [Upload artifacts](#upload-artifacts)
|
||||||
* [Install Only](#install-only)
|
* [Install Only](#install-only)
|
||||||
* [Using on GHES](#using-on-ghes)
|
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [outputs](#outputs)
|
* [outputs](#outputs)
|
||||||
|
|
@ -31,6 +31,12 @@ ___
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
GoReleaser Action runs [goreleaser][], please follow its [docs][gdocs] for
|
||||||
|
more information about how to customize what GoReleaser does.
|
||||||
|
|
||||||
|
[goreleaser]: https://goreleaser.com/
|
||||||
|
[gdocs]: https://goreleaser.com/customization
|
||||||
|
|
||||||
### Workflow
|
### Workflow
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
@ -40,26 +46,30 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
goreleaser:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
-
|
||||||
name: Set up Go
|
name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v6
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
# 'latest', 'nightly', or a semver
|
||||||
args: release --rm-dist
|
version: '~> v2'
|
||||||
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||||
|
|
@ -68,6 +78,49 @@ jobs:
|
||||||
|
|
||||||
> **IMPORTANT**: note the `fetch-depth: 0` input in `Checkout` step. It is required for the changelog to work correctly.
|
> **IMPORTANT**: note the `fetch-depth: 0` input in `Checkout` step. It is required for the changelog to work correctly.
|
||||||
|
|
||||||
|
### Verification
|
||||||
|
|
||||||
|
The action verifies the integrity of the downloaded GoReleaser archive
|
||||||
|
against the published `checksums.txt` automatically — no configuration
|
||||||
|
required.
|
||||||
|
|
||||||
|
If [`cosign`](https://docs.sigstore.dev/cosign/) is available on `PATH`, the
|
||||||
|
action will additionally verify the cosign sigstore signature of the
|
||||||
|
checksums file against the GoReleaser release workflow's OIDC identity. If
|
||||||
|
`cosign` isn't installed, this step is silently skipped.
|
||||||
|
|
||||||
|
> **Note**: cosign signature verification requires GoReleaser **v2.13.0 or
|
||||||
|
> newer** (and the matching `nightly`). Earlier releases ship a `.sig`
|
||||||
|
> detached signature signed with cosign v2, which is not compatible with
|
||||||
|
> the cosign v3 sigstore-bundle format the action verifies. For older
|
||||||
|
> versions the cosign step is silently skipped — only the `checksums.txt`
|
||||||
|
> SHA-256 verification runs.
|
||||||
|
|
||||||
|
> **Note**: when `version: nightly` is used, the action resolves the
|
||||||
|
> latest immutable `vX.Y.Z-<sha>-nightly` release from the GitHub
|
||||||
|
> Releases API. Pass `GITHUB_TOKEN` to the action step (as in the example
|
||||||
|
> above) to avoid unauthenticated API rate limits.
|
||||||
|
|
||||||
|
To enable signature verification, install cosign before running the action:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
-
|
||||||
|
name: Install cosign
|
||||||
|
uses: sigstore/cosign-installer@v3
|
||||||
|
-
|
||||||
|
name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v7
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: '~> v2'
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
Both checksum and signature verification work for tagged releases (≥ v2.13.0)
|
||||||
|
and the `nightly` channel.
|
||||||
|
|
||||||
### Run on new tag
|
### Run on new tag
|
||||||
|
|
||||||
If you want to run GoReleaser only on new tag, you can use this event:
|
If you want to run GoReleaser only on new tag, you can use this event:
|
||||||
|
|
@ -84,11 +137,11 @@ Or with a condition on GoReleaser step:
|
||||||
```yaml
|
```yaml
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '~> v2'
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
@ -104,16 +157,16 @@ the [Import GPG](https://github.com/crazy-max/ghaction-import-gpg) GitHub Action
|
||||||
-
|
-
|
||||||
name: Import GPG key
|
name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v5
|
uses: crazy-max/ghaction-import-gpg@v7
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '~> v2'
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||||
|
|
@ -130,21 +183,21 @@ signs:
|
||||||
### Upload artifacts
|
### Upload artifacts
|
||||||
|
|
||||||
For some events like pull request or schedule you might want to store the artifacts somewhere for testing
|
For some events like pull request or schedule you might want to store the artifacts somewhere for testing
|
||||||
purpose. You can do that with the [actions/upload-artifact](https://github.com/actions/upload-artifact) action:
|
purposes. You can do that with the [actions/upload-artifact](https://github.com/actions/upload-artifact) action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '~> v2'
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
workdir: myfolder
|
workdir: myfolder
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Upload assets
|
name: Upload assets
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: myapp
|
name: myapp
|
||||||
path: myfolder/dist/*
|
path: myfolder/dist/*
|
||||||
|
|
@ -156,44 +209,13 @@ purpose. You can do that with the [actions/upload-artifact](https://github.com/a
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Install GoReleaser
|
name: Install GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
-
|
-
|
||||||
name: Show GoReleaser version
|
name: Show GoReleaser version
|
||||||
run: goreleaser -v
|
run: goreleaser -v
|
||||||
```
|
```
|
||||||
### Using on GHES
|
|
||||||
|
|
||||||
If you specify a version or `latest` of GoReleaser in your workflow, the
|
|
||||||
version will be downloaded from [GitHub Releases in
|
|
||||||
`goreleaser/goreleaser`](https://github.com/goreleaser/goreleaser/releases)
|
|
||||||
repository. These calls to `goreleaser/goreleaser` are made via unauthenticated
|
|
||||||
requests, which are limited to [60 requests per hour per
|
|
||||||
IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
|
|
||||||
|
|
||||||
If more requests are made within the time frame, then you will start to see
|
|
||||||
rate-limit errors during downloading that looks like:
|
|
||||||
|
|
||||||
```
|
|
||||||
##[error]API rate limit exceeded for...
|
|
||||||
```
|
|
||||||
|
|
||||||
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new)
|
|
||||||
and pass it as the `github_token` input for the action:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
uses: goreleaser/goreleaser-action@v4
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
|
||||||
version: v1.14.1
|
|
||||||
```
|
|
||||||
|
|
||||||
If the runner is not able to access `github.com`, it will take the default one
|
|
||||||
available on the GitHub Runner or runner's tool cache. See "[Setting up the
|
|
||||||
tool cache on self-hosted runners without internet
|
|
||||||
access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)"
|
|
||||||
for more information.
|
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
|
|
@ -204,29 +226,46 @@ Following inputs can be used as `step.with` keys
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|------------------|---------|--------------|------------------------------------------------------------------|
|
|------------------|---------|--------------|------------------------------------------------------------------|
|
||||||
| `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` |
|
| `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` |
|
||||||
| `version`**Âą** | String | `latest` | GoReleaser version |
|
| `version`**Âą** | String | `~> v2` | GoReleaser version |
|
||||||
|
| `version-file`**²** | String | | Read the GoReleaser version from a file (see below) |
|
||||||
| `args` | String | | Arguments to pass to GoReleaser |
|
| `args` | String | | Arguments to pass to GoReleaser |
|
||||||
| `workdir` | String | `.` | Working directory (below repository root) |
|
| `workdir` | String | `.` | Working directory (below repository root) |
|
||||||
| `install-only` | Bool | `false` | Just install GoReleaser |
|
| `install-only` | Bool | `false` | Just install GoReleaser |
|
||||||
|
|
||||||
> **Âą** Can be a fixed version like `v0.117.0` or a max satisfying semver one like `~> 0.132`. In this case this will return `v0.132.1`.
|
> **Âą** Can be a fixed version like `v0.117.0` or a max satisfying semver one like `~> 0.132`. In this case this will return `v0.132.1`.
|
||||||
|
>
|
||||||
|
> **²** Path to a file containing the GoReleaser version. Resolved relative
|
||||||
|
> to `workdir`. Currently only [`.tool-versions`](https://asdf-vm.com/manage/configuration.html#tool-versions)
|
||||||
|
> (asdf/mise) format is supported. When set, this takes precedence over `version`.
|
||||||
|
>
|
||||||
|
> ```yaml
|
||||||
|
> # .tool-versions
|
||||||
|
> goreleaser 2.13.0
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> ```yaml
|
||||||
|
> - uses: goreleaser/goreleaser-action@v7
|
||||||
|
> with:
|
||||||
|
> version-file: .tool-versions
|
||||||
|
> args: release --clean
|
||||||
|
> ```
|
||||||
|
|
||||||
### outputs
|
### outputs
|
||||||
|
|
||||||
Following outputs are available
|
Following outputs are available
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|-------------------|---------|---------------------------------------|
|
|-------------|------|------------------------|
|
||||||
| `artifacts` | JSON | Build result artifacts |
|
| `artifacts` | JSON | Build result artifacts |
|
||||||
| `metadata` | JSON | Build result metadata |
|
| `metadata` | JSON | Build result metadata |
|
||||||
|
|
||||||
### environment variables
|
### environment variables
|
||||||
|
|
||||||
Following environment variables can be used as `step.env` keys
|
Following environment variables can be used as `step.env` keys
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
|------------------|---------------------------------------|
|
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` |
|
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` and requires `contents:write` |
|
||||||
| `GORELEASER_KEY` | Your [GoReleaser Pro](https://goreleaser.com/pro) License Key, in case you are using the `goreleaser-pro` distribution |
|
| `GORELEASER_KEY` | Your [GoReleaser Pro](https://goreleaser.com/pro) License Key, in case you are using the `goreleaser-pro` distribution |
|
||||||
|
|
||||||
## Limitation
|
## Limitation
|
||||||
|
|
@ -241,10 +280,10 @@ secret named `GH_PAT`, the step will look like this:
|
||||||
```yaml
|
```yaml
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v7
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '~> v2'
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||||
```
|
```
|
||||||
|
|
@ -255,15 +294,16 @@ If you need the auto-snapshot feature, take a look at [this example repository](
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full development workflow.
|
||||||
|
|
||||||
|
Quick reference:
|
||||||
|
|
||||||
```
|
```
|
||||||
# format code and build javascript artifacts
|
# install dependencies
|
||||||
docker buildx bake pre-checkin
|
npm ci
|
||||||
|
|
||||||
# validate all code has correctly formatted and built
|
# format, build dist/, and run tests
|
||||||
docker buildx bake validate
|
npm run pre-checkin
|
||||||
|
|
||||||
# run tests
|
|
||||||
docker buildx bake test
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
||||||
|
|
@ -1,46 +1,106 @@
|
||||||
import {describe, expect, it} from '@jest/globals';
|
import {describe, expect, it} from '@jest/globals';
|
||||||
import * as github from '../src/github';
|
import * as github from '../src/github';
|
||||||
|
|
||||||
describe('github', () => {
|
describe('getRelease', () => {
|
||||||
it('returns latest GoReleaser GitHub release', async () => {
|
it('returns latest GoReleaser GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser', 'latest');
|
||||||
const release = await github.getRelease('goreleaser', 'latest', githubToken);
|
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).not.toEqual('');
|
expect(release?.tag_name).not.toEqual('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns v0.182.0 GoReleaser GitHub release', async () => {
|
it('returns v0.182.0 GoReleaser GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser', 'v0.182.0');
|
||||||
const release = await github.getRelease('goreleaser', 'v0.182.0', githubToken);
|
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.182.0');
|
expect(release?.tag_name).toEqual('v0.182.0');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns v0.182.1 GoReleaser GitHub release', async () => {
|
it('returns v0.182.1 GoReleaser GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser', '~> 0.182');
|
||||||
const release = await github.getRelease('goreleaser', '~> 0.182', githubToken);
|
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.182.1');
|
expect(release?.tag_name).toEqual('v0.182.1');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('unknown GoReleaser release', async () => {
|
||||||
|
await expect(github.getRelease('goreleaser', 'foo')).rejects.toThrow(
|
||||||
|
new Error('Cannot find GoReleaser release foo in https://goreleaser.com/releases.json')
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('returns latest GoReleaser Pro GitHub release', async () => {
|
it('returns latest GoReleaser Pro GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser-pro', 'latest');
|
||||||
const release = await github.getRelease('goreleaser-pro', 'latest', githubToken);
|
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).not.toEqual('');
|
expect(release?.tag_name).not.toEqual('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns v0.182.0-pro GoReleaser Pro GitHub release', async () => {
|
it('returns latest v1 GoReleaser Pro GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser-pro', '~> v1');
|
||||||
const release = await github.getRelease('goreleaser-pro', 'v0.182.0-pro', githubToken);
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).not.toEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns latest v1 GoReleaser GitHub release', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser', '~> v1');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).not.toEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns latest v2 GoReleaser Pro GitHub release', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser-pro', '~> v2');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).not.toEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns latest v2 GoReleaser GitHub release', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser', '~> v2');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).not.toEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('resolves nightly to a <version>-<sha>-nightly release for OSS GoReleaser', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser', 'nightly');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release.tag_name).toMatch(github.nightlyTagRegex);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('resolves nightly to a <version>-<sha>-nightly release for GoReleaser Pro', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser-pro', 'nightly');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release.tag_name).toMatch(github.nightlyTagRegex);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns v0.182.0 GoReleaser Pro GitHub release', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser-pro', 'v0.182.0');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.182.0-pro');
|
expect(release?.tag_name).toEqual('v0.182.0-pro');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns v0.182.1-pro GoReleaser Pro GitHub release when using semver', async () => {
|
it('returns v0.182.1 GoReleaser Pro GitHub release', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const release = await github.getRelease('goreleaser-pro', '~> 0.182');
|
||||||
const release = await github.getRelease('goreleaser-pro', '~> 0.182', githubToken);
|
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.182.1-pro');
|
expect(release?.tag_name).toEqual('v0.182.1-pro');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns v2.7.0 GoReleaser Pro GitHub release', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser-pro', '~> v2.7');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).toEqual('v2.7.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('skips JSON check for specific version v2.8.1', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser', 'v2.8.1');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).toEqual('v2.8.1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('skips JSON check for specific version without v prefix', async () => {
|
||||||
|
const release = await github.getRelease('goreleaser', '2.8.1');
|
||||||
|
expect(release).not.toBeNull();
|
||||||
|
expect(release?.tag_name).toEqual('v2.8.1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('unknown GoReleaser Pro release', async () => {
|
||||||
|
await expect(github.getRelease('goreleaser-pro', 'foo')).rejects.toThrow(
|
||||||
|
new Error('Cannot find GoReleaser release foo in https://goreleaser.com/releases-pro.json')
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,60 @@
|
||||||
import {describe, expect, it} from '@jest/globals';
|
import {describe, expect, it} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
import * as os from 'os';
|
||||||
|
import * as path from 'path';
|
||||||
|
import * as io from '@actions/io';
|
||||||
import * as goreleaser from '../src/goreleaser';
|
import * as goreleaser from '../src/goreleaser';
|
||||||
|
|
||||||
describe('install', () => {
|
describe('install', () => {
|
||||||
it('acquires v0.182.0 version of GoReleaser', async () => {
|
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
|
||||||
const bin = await goreleaser.install('goreleaser', 'v0.182.0', githubToken);
|
|
||||||
expect(fs.existsSync(bin)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it('acquires latest version of GoReleaser', async () => {
|
it('acquires latest version of GoReleaser', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const bin = await goreleaser.install('goreleaser', 'latest');
|
||||||
const bin = await goreleaser.install('goreleaser', 'latest', githubToken);
|
|
||||||
expect(fs.existsSync(bin)).toBe(true);
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
it('acquires v0.182.0-pro version of GoReleaser Pro', async () => {
|
it('acquires latest v2 version of GoReleaser', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const bin = await goreleaser.install('goreleaser', '~> v2');
|
||||||
const bin = await goreleaser.install('goreleaser-pro', 'v0.182.0-pro', githubToken);
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
// The following pinned versions exercise install across release eras to
|
||||||
|
// guard against regressions in checksum handling and the cosign skip path:
|
||||||
|
// - v0.182.0 : pre-checksums-signing era
|
||||||
|
// - v1.26.2 : cosign v2 detached `.sig` only
|
||||||
|
// - v2.12.4 : last release before sigstore bundles (cosign skipped)
|
||||||
|
// - v2.13.0 : first release with cosign v3 sigstore bundle
|
||||||
|
// - v2.15.3 : recent release with sigstore bundle
|
||||||
|
it('acquires v0.182.0 (pre-signing) version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v0.182.0');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires v1.26.2 (cosign v2 .sig) version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v1.26.2');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires v2.12.4 (last pre-sigstore-bundle) version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v2.12.4');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires v2.13.0 (minimum cosign-verifiable) version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v2.13.0');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires v2.15.3 (recent sigstore-bundle) version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v2.15.3');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires latest v2 version of GoReleaser Pro', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser-pro', '~> v2');
|
||||||
expect(fs.existsSync(bin)).toBe(true);
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
it('acquires latest version of GoReleaser Pro', async () => {
|
it('acquires latest version of GoReleaser Pro', async () => {
|
||||||
const githubToken = process.env.GITHUB_TOKEN || '';
|
const bin = await goreleaser.install('goreleaser-pro', 'latest');
|
||||||
const bin = await goreleaser.install('goreleaser-pro', 'latest', githubToken);
|
|
||||||
expect(fs.existsSync(bin)).toBe(true);
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
});
|
});
|
||||||
|
|
@ -37,3 +68,100 @@ describe('distribSuffix', () => {
|
||||||
expect(goreleaser.distribSuffix('goreleaser')).toEqual('');
|
expect(goreleaser.distribSuffix('goreleaser')).toEqual('');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('findChecksum', () => {
|
||||||
|
const sample = [
|
||||||
|
'*malformed-line',
|
||||||
|
'',
|
||||||
|
'abc123 goreleaser_Linux_x86_64.tar.gz',
|
||||||
|
'def456 *goreleaser_Darwin_all.tar.gz',
|
||||||
|
'789xyz checksums.txt'
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
|
it('finds a checksum by filename', () => {
|
||||||
|
expect(goreleaser.findChecksum(sample, 'goreleaser_Linux_x86_64.tar.gz')).toEqual('abc123');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('strips a leading asterisk on the filename (binary mode)', () => {
|
||||||
|
expect(goreleaser.findChecksum(sample, 'goreleaser_Darwin_all.tar.gz')).toEqual('def456');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns undefined when not present', () => {
|
||||||
|
expect(goreleaser.findChecksum(sample, 'missing.tar.gz')).toBeUndefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getCertificateIdentity', () => {
|
||||||
|
it('returns the OSS workflow identity for tagged releases', () => {
|
||||||
|
expect(goreleaser.getCertificateIdentity('goreleaser', 'v2.15.3')).toEqual(
|
||||||
|
'https://github.com/goreleaser/goreleaser/.github/workflows/release.yml@refs/tags/v2.15.3'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns the Pro internal workflow identity for tagged releases', () => {
|
||||||
|
expect(goreleaser.getCertificateIdentity('goreleaser-pro', 'v2.15.3')).toEqual(
|
||||||
|
'https://github.com/goreleaser/goreleaser-pro-internal/.github/workflows/release-pro.yml@refs/tags/v2.15.3'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses nightly-oss.yml@refs/heads/main for OSS nightly tag', () => {
|
||||||
|
expect(goreleaser.getCertificateIdentity('goreleaser', 'v2.16.0-abc1234-nightly')).toEqual(
|
||||||
|
'https://github.com/goreleaser/goreleaser/.github/workflows/nightly-oss.yml@refs/heads/main'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses nightly-pro.yml@refs/heads/main for Pro nightly tag', () => {
|
||||||
|
expect(goreleaser.getCertificateIdentity('goreleaser-pro', 'v2.16.0-eaeb08c50-nightly')).toEqual(
|
||||||
|
'https://github.com/goreleaser/goreleaser-pro-internal/.github/workflows/nightly-pro.yml@refs/heads/main'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('verifyChecksum', () => {
|
||||||
|
const requireCosign = async (): Promise<void> => {
|
||||||
|
const cosign = await io.which('cosign', false);
|
||||||
|
if (!cosign) {
|
||||||
|
throw new Error(
|
||||||
|
'cosign must be installed in PATH to run this integration test (apk add cosign / sigstore/cosign-installer)'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
it('verifies a tagged OSS release end-to-end with cosign', async () => {
|
||||||
|
await requireCosign();
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v2.15.3');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 120000);
|
||||||
|
|
||||||
|
it('verifies the OSS nightly release end-to-end with cosign', async () => {
|
||||||
|
await requireCosign();
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'nightly');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 120000);
|
||||||
|
|
||||||
|
it('installs a pre-v2.13 release (no sigstore bundle) without failing when cosign is present', async () => {
|
||||||
|
// v2.12.x is the last release that did NOT publish checksums.txt.sigstore.json.
|
||||||
|
// The action must still install it cleanly: checksum verified, cosign step skipped.
|
||||||
|
await requireCosign();
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v2.12.4');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 120000);
|
||||||
|
|
||||||
|
it('throws on checksum mismatch', async () => {
|
||||||
|
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gha-'));
|
||||||
|
const archive = path.join(dir, 'fake.tar.gz');
|
||||||
|
fs.writeFileSync(archive, 'tampered content');
|
||||||
|
await expect(
|
||||||
|
goreleaser.verifyChecksum('goreleaser', 'v2.15.3', archive, 'goreleaser_Linux_x86_64.tar.gz')
|
||||||
|
).rejects.toThrow(/Checksum mismatch/);
|
||||||
|
}, 60000);
|
||||||
|
|
||||||
|
it('throws when the filename is not in checksums.txt', async () => {
|
||||||
|
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gha-'));
|
||||||
|
const archive = path.join(dir, 'whatever.tar.gz');
|
||||||
|
fs.writeFileSync(archive, '');
|
||||||
|
await expect(
|
||||||
|
goreleaser.verifyChecksum('goreleaser', 'v2.15.3', archive, 'not-a-real-asset.tar.gz')
|
||||||
|
).rejects.toThrow(/Could not find not-a-real-asset.tar.gz in checksums.txt/);
|
||||||
|
}, 60000);
|
||||||
|
});
|
||||||
|
|
|
||||||
117
__tests__/version.test.ts
Normal file
117
__tests__/version.test.ts
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
import {describe, expect, it, beforeEach, afterEach} from '@jest/globals';
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as os from 'os';
|
||||||
|
import * as path from 'path';
|
||||||
|
import {getRequestedVersion} from '../src/version';
|
||||||
|
import {Inputs} from '../src/context';
|
||||||
|
|
||||||
|
const baseInputs = (overrides: Partial<Inputs>): Inputs => ({
|
||||||
|
distribution: 'goreleaser',
|
||||||
|
version: '~> v2',
|
||||||
|
versionFile: '',
|
||||||
|
args: '',
|
||||||
|
workdir: '.',
|
||||||
|
installOnly: false,
|
||||||
|
...overrides
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getRequestedVersion', () => {
|
||||||
|
let tmpDir: string;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'goreleaser-version-'));
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
fs.rmSync(tmpDir, {recursive: true, force: true});
|
||||||
|
});
|
||||||
|
|
||||||
|
const writeToolVersions = (content: string, name = '.tool-versions'): void => {
|
||||||
|
fs.writeFileSync(path.join(tmpDir, name), content);
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('without version-file', () => {
|
||||||
|
it('returns the version input as-is', () => {
|
||||||
|
expect(getRequestedVersion(baseInputs({version: 'v1.2.3'}))).toBe('v1.2.3');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns the default version when none is provided', () => {
|
||||||
|
expect(getRequestedVersion(baseInputs({version: '~> v2'}))).toBe('~> v2');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('with .tool-versions', () => {
|
||||||
|
it('parses an unprefixed version and adds the v prefix', () => {
|
||||||
|
writeToolVersions('goreleaser 1.2.3\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('v1.2.3');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('keeps an existing v prefix without doubling it', () => {
|
||||||
|
writeToolVersions('goreleaser v1.2.3\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('v1.2.3');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('takes precedence over the version input', () => {
|
||||||
|
writeToolVersions('goreleaser 1.2.3\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({version: 'v9.9.9', versionFile: '.tool-versions', workdir: tmpDir}))).toBe(
|
||||||
|
'v1.2.3'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('ignores other tools and picks goreleaser', () => {
|
||||||
|
writeToolVersions(['nodejs 20.10.0', 'goreleaser 2.13.0', 'python 3.12.1', ''].join('\n'));
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('v2.13.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('skips full-line and inline comments', () => {
|
||||||
|
writeToolVersions(['# pinned for CI', 'goreleaser 2.13.0 # minimum cosign-verifiable', ''].join('\n'));
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('v2.13.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('preserves "latest"', () => {
|
||||||
|
writeToolVersions('goreleaser latest\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('latest');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses only the first version when multiple fallbacks are listed', () => {
|
||||||
|
// asdf supports listing fallback versions; we install the first match.
|
||||||
|
writeToolVersions('goreleaser 2.13.0 2.12.4\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toBe('v2.13.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('accepts an absolute path and ignores workdir', () => {
|
||||||
|
const abs = path.join(tmpDir, '.tool-versions');
|
||||||
|
fs.writeFileSync(abs, 'goreleaser 2.13.0\n');
|
||||||
|
expect(getRequestedVersion(baseInputs({versionFile: abs, workdir: '/nonexistent'}))).toBe('v2.13.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('throws when the file does not exist', () => {
|
||||||
|
expect(() => getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toThrow(
|
||||||
|
/version-file not found/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('throws when the file has no goreleaser entry', () => {
|
||||||
|
writeToolVersions(['nodejs 20.10.0', 'python 3.12.1', ''].join('\n'));
|
||||||
|
expect(() => getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toThrow(
|
||||||
|
/No goreleaser entry/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('throws when the goreleaser entry has no version', () => {
|
||||||
|
writeToolVersions('goreleaser\n');
|
||||||
|
expect(() => getRequestedVersion(baseInputs({versionFile: '.tool-versions', workdir: tmpDir}))).toThrow(
|
||||||
|
/No version specified for goreleaser/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('with an unsupported file', () => {
|
||||||
|
it('throws a clear error', () => {
|
||||||
|
fs.writeFileSync(path.join(tmpDir, '.go-version'), '1.2.3\n');
|
||||||
|
expect(() => getRequestedVersion(baseInputs({versionFile: '.go-version', workdir: tmpDir}))).toThrow(
|
||||||
|
/Unsupported version-file/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
19
action.yml
19
action.yml
|
|
@ -13,7 +13,13 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
version:
|
version:
|
||||||
description: 'GoReleaser version'
|
description: 'GoReleaser version'
|
||||||
default: 'latest'
|
default: '~> v2'
|
||||||
|
required: false
|
||||||
|
version-file:
|
||||||
|
description: |
|
||||||
|
Read the GoReleaser version from a file. Path is resolved relative to
|
||||||
|
`workdir`. Currently only `.tool-versions` (asdf/mise) is supported.
|
||||||
|
When set, takes precedence over `version`.
|
||||||
required: false
|
required: false
|
||||||
args:
|
args:
|
||||||
description: 'Arguments to pass to GoReleaser'
|
description: 'Arguments to pass to GoReleaser'
|
||||||
|
|
@ -26,15 +32,6 @@ inputs:
|
||||||
description: 'Just install GoReleaser'
|
description: 'Just install GoReleaser'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
github-token:
|
|
||||||
description: >
|
|
||||||
Used to verifiy the Git tag exists on goreleaser/goreleaser repo. Since there's a
|
|
||||||
default, this is typically not supplied by the user. When running this
|
|
||||||
action on github.com, the default value is sufficient. When running on
|
|
||||||
GHES, you can pass a personal access token for github.com if you are
|
|
||||||
experiencing rate limiting.
|
|
||||||
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
|
|
||||||
required: false
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
@ -43,5 +40,5 @@ outputs:
|
||||||
description: 'Build result metadata'
|
description: 'Build result metadata'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node24'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
|
|
||||||
ARG NODE_VERSION=16
|
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
|
||||||
RUN apk add --no-cache cpio findutils git
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
FROM base AS deps
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
|
||||||
|
|
||||||
FROM scratch AS vendor-update
|
|
||||||
COPY --from=deps /vendor /
|
|
||||||
|
|
||||||
FROM deps AS vendor-validate
|
|
||||||
RUN --mount=type=bind,target=.,rw <<EOT
|
|
||||||
set -e
|
|
||||||
git add -A
|
|
||||||
cp -rf /vendor/* .
|
|
||||||
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then
|
|
||||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'
|
|
||||||
git status --porcelain -- yarn.lock
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
EOT
|
|
||||||
|
|
||||||
FROM deps AS build
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run build && mkdir /out && cp -Rf dist /out/
|
|
||||||
|
|
||||||
FROM scratch AS build-update
|
|
||||||
COPY --from=build /out /
|
|
||||||
|
|
||||||
FROM build AS build-validate
|
|
||||||
RUN --mount=type=bind,target=.,rw <<EOT
|
|
||||||
set -e
|
|
||||||
git add -A
|
|
||||||
cp -rf /out/* .
|
|
||||||
if [ -n "$(git status --porcelain -- dist)" ]; then
|
|
||||||
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
|
|
||||||
git status --porcelain -- dist
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
EOT
|
|
||||||
|
|
||||||
FROM deps AS format
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run format \
|
|
||||||
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
|
|
||||||
|
|
||||||
FROM scratch AS format-update
|
|
||||||
COPY --from=format /out /
|
|
||||||
|
|
||||||
FROM deps AS lint
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run lint
|
|
||||||
|
|
||||||
FROM deps AS test
|
|
||||||
ENV RUNNER_TEMP=/tmp/github_runner
|
|
||||||
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
--mount=type=secret,id=GITHUB_TOKEN \
|
|
||||||
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) yarn run test --coverageDirectory=/tmp/coverage
|
|
||||||
|
|
||||||
FROM scratch AS test-coverage
|
|
||||||
COPY --from=test /tmp/coverage /
|
|
||||||
43
dist/index.js
generated
vendored
43
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
1
dist/index.js.map
generated
vendored
1
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
638
dist/licenses.txt
generated
vendored
638
dist/licenses.txt
generated
vendored
|
|
@ -22,18 +22,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
@actions/github
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright 2019 GitHub
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
@actions/http-client
|
@actions/http-client
|
||||||
MIT
|
MIT
|
||||||
Actions Http Client for Node.js
|
Actions Http Client for Node.js
|
||||||
|
|
@ -83,193 +71,11 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
@octokit/auth-token
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/core
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/endpoint
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2018 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/graphql
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2018 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/plugin-paginate-rest
|
|
||||||
MIT
|
|
||||||
MIT License Copyright (c) 2019 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/plugin-rest-endpoint-methods
|
|
||||||
MIT
|
|
||||||
MIT License Copyright (c) 2019 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/request
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2018 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@octokit/request-error
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
@vercel/ncc
|
|
||||||
MIT
|
|
||||||
Copyright 2018 ZEIT, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
ansi-regex
|
ansi-regex
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -282,7 +88,7 @@ ansi-styles
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -291,211 +97,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
before-after-hook
|
|
||||||
Apache-2.0
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright 2018 Gregor Martynus and other contributors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
cliui
|
cliui
|
||||||
ISC
|
ISC
|
||||||
Copyright (c) 2015, Contributors
|
Copyright (c) 2015, Contributors
|
||||||
|
|
@ -514,61 +115,6 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
color-convert
|
|
||||||
MIT
|
|
||||||
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
color-name
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
Copyright (c) 2015 Dmitry Ivanov
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
deprecation
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Gregor Martynus and contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
emoji-regex
|
emoji-regex
|
||||||
MIT
|
MIT
|
||||||
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
||||||
|
|
@ -616,11 +162,11 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
is-fullwidth-code-point
|
get-east-asian-width
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -629,31 +175,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
is-plain-object
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
js-yaml
|
js-yaml
|
||||||
MIT
|
MIT
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
@ -679,77 +200,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
node-fetch
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 David Frank
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
once
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
require-directory
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2011 Troy Goode <troygoode@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
semver
|
semver
|
||||||
ISC
|
ISC
|
||||||
The ISC License
|
The ISC License
|
||||||
|
|
@ -773,7 +223,7 @@ string-width
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -786,7 +236,7 @@ strip-ansi
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
@ -795,9 +245,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
tr46
|
|
||||||
MIT
|
|
||||||
|
|
||||||
tunnel
|
tunnel
|
||||||
MIT
|
MIT
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
@ -823,51 +270,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
universal-user-agent
|
undici
|
||||||
ISC
|
|
||||||
# [ISC License](https://spdx.org/licenses/ISC)
|
|
||||||
|
|
||||||
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
uuid
|
|
||||||
MIT
|
MIT
|
||||||
The MIT License (MIT)
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
Copyright (c) Matteo Collina and Undici contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
webidl-conversions
|
|
||||||
BSD-2-Clause
|
|
||||||
# The BSD 2-Clause License
|
|
||||||
|
|
||||||
Copyright (c) 2014, Domenic Denicola
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
whatwg-url
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015–2016 Sebastian Mayr
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
@ -876,16 +283,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in all
|
||||||
all copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
THE SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
wrap-ansi
|
wrap-ansi
|
||||||
|
|
@ -901,25 +308,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
wrappy
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
y18n
|
y18n
|
||||||
ISC
|
ISC
|
||||||
Copyright (c) 2015, Contributors
|
Copyright (c) 2015, Contributors
|
||||||
|
|
|
||||||
3
dist/package.json
generated
vendored
Normal file
3
dist/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
||||||
1
dist/sourcemap-register.js
generated
vendored
1
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,54 +0,0 @@
|
||||||
group "default" {
|
|
||||||
targets = ["build"]
|
|
||||||
}
|
|
||||||
|
|
||||||
group "pre-checkin" {
|
|
||||||
targets = ["vendor-update", "format", "build"]
|
|
||||||
}
|
|
||||||
|
|
||||||
group "validate" {
|
|
||||||
targets = ["lint", "build-validate", "vendor-validate"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "build" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "build-update"
|
|
||||||
output = ["."]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "build-validate" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "build-validate"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "format" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "format-update"
|
|
||||||
output = ["."]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "lint" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "lint"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "vendor-update" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "vendor-update"
|
|
||||||
output = ["."]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "vendor-validate" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "vendor-validate"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "test" {
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "test-coverage"
|
|
||||||
output = ["./coverage"]
|
|
||||||
secret = ["id=GITHUB_TOKEN,env=GITHUB_TOKEN"]
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +1,24 @@
|
||||||
module.exports = {
|
import type {Config} from 'jest';
|
||||||
|
|
||||||
|
const config: Config = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
setupFiles: [
|
setupFiles: ['dotenv/config', '<rootDir>/src/test_setup.ts'],
|
||||||
'dotenv/config',
|
|
||||||
'<rootDir>/src/test_setup.ts'
|
|
||||||
],
|
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
testTimeout: 30000,
|
testTimeout: 30000,
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': [
|
||||||
|
'ts-jest',
|
||||||
|
{
|
||||||
|
useESM: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
extensionsToTreatAsEsm: ['.ts'],
|
||||||
|
moduleNameMapper: {
|
||||||
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||||
},
|
},
|
||||||
verbose: true
|
verbose: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
|
|
|
||||||
5886
package-lock.json
generated
Normal file
5886
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
58
package.json
58
package.json
|
|
@ -1,13 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "goreleaser-action",
|
"name": "goreleaser-action",
|
||||||
"description": "GitHub Action for GoReleaser, a release automation tool for Go projects",
|
"description": "GitHub Action for GoReleaser, a release automation tool for Go projects",
|
||||||
"main": "lib/main.js",
|
"main": "src/main.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
|
"build": "ncc build src/main.ts --minify --license licenses.txt",
|
||||||
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
|
"format": "prettier --write \"**/*.ts\"",
|
||||||
"format": "eslint --fix src/**/*.ts __tests__/**/*.ts",
|
"format-check": "prettier --check \"**/*.ts\"",
|
||||||
"test": "jest --coverage",
|
"lint": "eslint --max-warnings=0 \"**/*.ts\"",
|
||||||
"all": "yarn run build && yarn run format && yarn test"
|
"lint:fix": "eslint --fix \"**/*.ts\"",
|
||||||
|
"test": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage",
|
||||||
|
"pre-checkin": "npm run format && npm run lint:fix && npm run build && npm test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -20,30 +23,31 @@
|
||||||
],
|
],
|
||||||
"author": "CrazyMax",
|
"author": "CrazyMax",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/http-client": "^4.0.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/tool-cache": "^4.0.0",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"js-yaml": "^4.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"semver": "^7.7.4",
|
||||||
"yargs": "^17.6.2"
|
"yargs": "^18.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.11.26",
|
"@types/node": "^24.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
||||||
"@typescript-eslint/parser": "^5.14.0",
|
"@typescript-eslint/parser": "^6.6.0",
|
||||||
"@vercel/ncc": "^0.33.3",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.49.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-plugin-jest": "^26.1.1",
|
"eslint-plugin-jest": "^27.2.3",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"jest": "^27.2.5",
|
"jest": "^29.6.4",
|
||||||
"prettier": "^2.3.1",
|
"prettier": "^3.0.3",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"ts-jest": "^27.1.2",
|
"ts-jest": "^29.1.1",
|
||||||
"ts-node": "^10.7.0",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.4.4"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,19 +7,19 @@ export const osArch: string = os.arch();
|
||||||
export interface Inputs {
|
export interface Inputs {
|
||||||
distribution: string;
|
distribution: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
versionFile: string;
|
||||||
args: string;
|
args: string;
|
||||||
workdir: string;
|
workdir: string;
|
||||||
installOnly: boolean;
|
installOnly: boolean;
|
||||||
githubToken: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
return {
|
return {
|
||||||
distribution: core.getInput('distribution') || 'goreleaser',
|
distribution: core.getInput('distribution') || 'goreleaser',
|
||||||
version: core.getInput('version'),
|
version: core.getInput('version') || '~> v2',
|
||||||
|
versionFile: core.getInput('version-file'),
|
||||||
args: core.getInput('args'),
|
args: core.getInput('args'),
|
||||||
workdir: core.getInput('workdir') || '.',
|
workdir: core.getInput('workdir') || '.',
|
||||||
githubToken: core.getInput('github-token'),
|
|
||||||
installOnly: core.getBooleanInput('install-only')
|
installOnly: core.getBooleanInput('install-only')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
169
src/github.ts
169
src/github.ts
|
|
@ -2,58 +2,123 @@ import * as goreleaser from './goreleaser';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as httpm from '@actions/http-client';
|
import * as httpm from '@actions/http-client';
|
||||||
import * as github from '@actions/github';
|
|
||||||
|
|
||||||
export interface Release {
|
const maxRetries = 10;
|
||||||
id: number;
|
const timeoutMs = 1000;
|
||||||
|
const withRetry = async <T>(operation: () => Promise<T>): Promise<T> => {
|
||||||
|
let lastError: Error;
|
||||||
|
|
||||||
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
||||||
|
try {
|
||||||
|
return await operation();
|
||||||
|
} catch (error) {
|
||||||
|
lastError = error as Error;
|
||||||
|
|
||||||
|
if (attempt === maxRetries) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
core.debug(`Attempt ${attempt + 1} failed, retrying in ${timeoutMs}: ${lastError.message}`);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, timeoutMs));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw lastError;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface GitHubRelease {
|
||||||
tag_name: string;
|
tag_name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const owner = 'goreleaser';
|
// Matches the new-style nightly release tag pattern: vX.Y.Z-<sha>-nightly
|
||||||
|
export const nightlyTagRegex = /^v\d+\.\d+\.\d+-[0-9a-f]+-nightly$/i;
|
||||||
|
|
||||||
export const getRelease = async (
|
export const isNightlyTag = (tag: string): boolean => {
|
||||||
distribution: string,
|
return nightlyTagRegex.test(tag);
|
||||||
version: string,
|
};
|
||||||
githubToken: string
|
|
||||||
): Promise<Release | null> => {
|
export const getRelease = async (distribution: string, version: string): Promise<GitHubRelease> => {
|
||||||
if (version === 'latest') {
|
if (version === 'latest') {
|
||||||
return getLatestRelease(distribution, githubToken);
|
core.warning("You are using 'latest' as default version. Will lock to '~> v2'.");
|
||||||
|
return getReleaseTag(distribution, '~> v2');
|
||||||
}
|
}
|
||||||
|
return getReleaseTag(distribution, version);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getReleaseTag = async (distribution: string, version: string): Promise<GitHubRelease> => {
|
||||||
|
if (version === 'nightly') {
|
||||||
|
return resolveNightly(distribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If version is a specific version (not a range), skip the JSON check
|
||||||
|
const cleanVersion: string = cleanTag(version);
|
||||||
|
if (semver.valid(cleanVersion)) {
|
||||||
|
let tag = version.startsWith('v') ? version : `v${version}`;
|
||||||
|
|
||||||
|
// Handle GoReleaser Pro suffix for versions < 2.7.0, but only if not already present
|
||||||
|
// TODO: remove all this `-pro` thing at some point.
|
||||||
|
if (goreleaser.isPro(distribution) && semver.lt(cleanVersion, '2.7.0') && !tag.endsWith('-pro')) {
|
||||||
|
tag = tag + goreleaser.distribSuffix(distribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {tag_name: tag};
|
||||||
|
}
|
||||||
|
|
||||||
const tag: string = (await resolveVersion(distribution, version)) || version;
|
const tag: string = (await resolveVersion(distribution, version)) || version;
|
||||||
return getReleaseTag(distribution, tag, githubToken);
|
const suffix: string = goreleaser.distribSuffix(distribution);
|
||||||
|
const url = `https://goreleaser.com/releases${suffix}.json`;
|
||||||
|
|
||||||
|
const releases = await withRetry(async () => {
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
||||||
|
const resp: httpm.HttpClientResponse = await http.get(url);
|
||||||
|
const body = await resp.readBody();
|
||||||
|
const statusCode = resp.message.statusCode || 500;
|
||||||
|
if (statusCode >= 400) {
|
||||||
|
throw new Error(
|
||||||
|
`Failed to get GoReleaser release ${version} from ${url} with status code ${statusCode}: ${body}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return <Array<GitHubRelease>>JSON.parse(body);
|
||||||
|
});
|
||||||
|
|
||||||
|
const res = releases.filter(r => r.tag_name === tag).shift();
|
||||||
|
if (res) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
throw new Error(`Cannot find GoReleaser release ${version} in ${url}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getReleaseTag = async (repo: string, tag: string, githubToken: string): Promise<Release> => {
|
// resolveNightly looks up the latest immutable nightly release of the form
|
||||||
core.info(`Getting tag ${resolveVersion}...`);
|
// `vX.Y.Z-<sha>-nightly` on the GitHub releases of the given distribution.
|
||||||
return (
|
const resolveNightly = async (distribution: string): Promise<GitHubRelease> => {
|
||||||
await github
|
const url = `https://api.github.com/repos/goreleaser/${distribution}/releases?per_page=100`;
|
||||||
.getOctokit(githubToken, {
|
core.debug(`Resolving latest nightly release from ${url}`);
|
||||||
baseUrl: 'https://api.github.com'
|
|
||||||
})
|
|
||||||
.rest.repos.getReleaseByTag({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
tag
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
throw new Error(`Cannot get ${repo} release ${tag}: ${error}`);
|
|
||||||
})
|
|
||||||
).data as Release;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getLatestRelease = async (repo: string, githubToken: string): Promise<Release> => {
|
const releases = await withRetry(async () => {
|
||||||
core.info(`Getting tag latest...`);
|
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
||||||
return (
|
const headers: {[name: string]: string} = {
|
||||||
await github
|
Accept: 'application/vnd.github+json',
|
||||||
.getOctokit(githubToken)
|
'X-GitHub-Api-Version': '2022-11-28'
|
||||||
.rest.repos.getLatestRelease({
|
};
|
||||||
owner,
|
const token = process.env.GITHUB_TOKEN;
|
||||||
repo
|
if (token) {
|
||||||
})
|
headers['Authorization'] = `Bearer ${token}`;
|
||||||
.catch(error => {
|
}
|
||||||
throw new Error(`Cannot get latest release: ${error}`);
|
const resp: httpm.HttpClientResponse = await http.get(url, headers);
|
||||||
})
|
const body = await resp.readBody();
|
||||||
).data as Release;
|
const statusCode = resp.message.statusCode || 500;
|
||||||
|
if (statusCode >= 400) {
|
||||||
|
throw new Error(`Failed to list releases from ${url} with status code ${statusCode}: ${body}`);
|
||||||
|
}
|
||||||
|
return <Array<GitHubRelease>>JSON.parse(body);
|
||||||
|
});
|
||||||
|
|
||||||
|
const match = releases.find(r => nightlyTagRegex.test(r.tag_name));
|
||||||
|
if (!match) {
|
||||||
|
throw new Error(`No '<version>-<sha>-nightly' release found in ${url}`);
|
||||||
|
}
|
||||||
|
core.info(`Resolved nightly to ${match.tag_name}`);
|
||||||
|
return match;
|
||||||
};
|
};
|
||||||
|
|
||||||
const resolveVersion = async (distribution: string, version: string): Promise<string | null> => {
|
const resolveVersion = async (distribution: string, version: string): Promise<string | null> => {
|
||||||
|
|
@ -65,7 +130,16 @@ const resolveVersion = async (distribution: string, version: string): Promise<st
|
||||||
|
|
||||||
const cleanTags: Array<string> = allTags.map(tag => cleanTag(tag));
|
const cleanTags: Array<string> = allTags.map(tag => cleanTag(tag));
|
||||||
const cleanVersion: string = cleanTag(version);
|
const cleanVersion: string = cleanTag(version);
|
||||||
return semver.maxSatisfying(cleanTags, cleanVersion) + goreleaser.distribSuffix(distribution);
|
if (!semver.valid(cleanVersion) && !semver.validRange(cleanVersion)) {
|
||||||
|
// if the given version is invalid, return whatever we got.
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
const v = semver.maxSatisfying(cleanTags, cleanVersion);
|
||||||
|
if (semver.lt(v, '2.7.0')) {
|
||||||
|
// if its a version older than 2.7.0, append the suffix.
|
||||||
|
return v + goreleaser.distribSuffix(distribution);
|
||||||
|
}
|
||||||
|
return v;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface GitHubTag {
|
interface GitHubTag {
|
||||||
|
|
@ -73,12 +147,13 @@ interface GitHubTag {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAllTags = async (distribution: string): Promise<Array<string>> => {
|
const getAllTags = async (distribution: string): Promise<Array<string>> => {
|
||||||
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
|
||||||
const suffix: string = goreleaser.distribSuffix(distribution);
|
const suffix: string = goreleaser.distribSuffix(distribution);
|
||||||
const url = `https://goreleaser.com/static/releases${suffix}.json`;
|
const url = `https://goreleaser.com/releases${suffix}.json`;
|
||||||
core.info(`Downloading ${url}`);
|
core.debug(`Downloading ${url}`);
|
||||||
const getTags = http.getJson<Array<GitHubTag>>(url);
|
|
||||||
return getTags.then(response => {
|
return withRetry(async () => {
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
||||||
|
const response = await http.getJson<Array<GitHubTag>>(url);
|
||||||
if (response.result == null) {
|
if (response.result == null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,26 @@
|
||||||
|
import * as crypto from 'crypto';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as util from 'util';
|
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import * as context from './context';
|
import * as context from './context';
|
||||||
import * as github from './github';
|
import * as github from './github';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import * as exec from '@actions/exec';
|
||||||
|
import * as io from '@actions/io';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
|
|
||||||
export async function install(distribution: string, version: string, githubToken: string): Promise<string> {
|
export async function install(distribution: string, version: string): Promise<string> {
|
||||||
const release: github.Release | null = await github.getRelease(distribution, version, githubToken);
|
const release: github.GitHubRelease = await github.getRelease(distribution, version);
|
||||||
if (!release) {
|
|
||||||
throw new Error(`Cannot find GoReleaser ${version} release`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const filename = getFilename(distribution);
|
const filename = getFilename(distribution);
|
||||||
const downloadUrl = util.format(
|
const baseUrl = `https://github.com/goreleaser/${distribution}/releases/download/${release.tag_name}`;
|
||||||
'https://github.com/goreleaser/%s/releases/download/%s/%s',
|
const downloadUrl = `${baseUrl}/${filename}`;
|
||||||
distribution,
|
|
||||||
release.tag_name,
|
|
||||||
filename
|
|
||||||
);
|
|
||||||
|
|
||||||
core.info(`Downloading ${downloadUrl}`);
|
core.info(`Downloading ${downloadUrl}`);
|
||||||
const downloadPath: string = await tc.downloadTool(downloadUrl);
|
const downloadPath: string = await tc.downloadTool(downloadUrl);
|
||||||
core.debug(`Downloaded to ${downloadPath}`);
|
core.debug(`Downloaded to ${downloadPath}`);
|
||||||
|
|
||||||
|
await verifyChecksum(distribution, release.tag_name, downloadPath, filename);
|
||||||
|
|
||||||
core.info('Extracting GoReleaser');
|
core.info('Extracting GoReleaser');
|
||||||
let extPath: string;
|
let extPath: string;
|
||||||
if (context.osPlat == 'win32') {
|
if (context.osPlat == 'win32') {
|
||||||
|
|
@ -49,6 +45,92 @@ export async function install(distribution: string, version: string, githubToken
|
||||||
return exePath;
|
return exePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function verifyChecksum(
|
||||||
|
distribution: string,
|
||||||
|
tag: string,
|
||||||
|
archivePath: string,
|
||||||
|
filename: string
|
||||||
|
): Promise<void> {
|
||||||
|
const baseUrl = `https://github.com/goreleaser/${distribution}/releases/download/${tag}`;
|
||||||
|
let checksumsPath: string;
|
||||||
|
try {
|
||||||
|
core.info(`Downloading ${baseUrl}/checksums.txt`);
|
||||||
|
checksumsPath = await tc.downloadTool(`${baseUrl}/checksums.txt`);
|
||||||
|
} catch (e) {
|
||||||
|
core.warning(`Skipping checksum verification: unable to download checksums.txt: ${e.message}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const sha256 = crypto.createHash('sha256').update(fs.readFileSync(archivePath)).digest('hex');
|
||||||
|
const expected = findChecksum(fs.readFileSync(checksumsPath, 'utf8'), filename);
|
||||||
|
if (!expected) {
|
||||||
|
throw new Error(`Could not find ${filename} in checksums.txt`);
|
||||||
|
}
|
||||||
|
if (expected.toLowerCase() !== sha256.toLowerCase()) {
|
||||||
|
throw new Error(`Checksum mismatch for ${filename}: expected ${expected}, got ${sha256}`);
|
||||||
|
}
|
||||||
|
core.info(`Checksum verified for ${filename}`);
|
||||||
|
|
||||||
|
await verifyCosignSignature(distribution, tag, baseUrl, checksumsPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const findChecksum = (checksumsContent: string, filename: string): string | undefined => {
|
||||||
|
const match = checksumsContent
|
||||||
|
.split('\n')
|
||||||
|
.map(line => line.trim().split(/\s+/))
|
||||||
|
.find(parts => parts.length >= 2 && parts[1].replace(/^[*]/, '') === filename);
|
||||||
|
return match ? match[0] : undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
async function verifyCosignSignature(
|
||||||
|
distribution: string,
|
||||||
|
tag: string,
|
||||||
|
baseUrl: string,
|
||||||
|
checksumsPath: string
|
||||||
|
): Promise<void> {
|
||||||
|
const cosign = await io.which('cosign', false);
|
||||||
|
if (!cosign) {
|
||||||
|
core.info('cosign not found in PATH, skipping signature verification');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let bundlePath: string;
|
||||||
|
try {
|
||||||
|
core.info(`Downloading ${baseUrl}/checksums.txt.sigstore.json`);
|
||||||
|
bundlePath = await tc.downloadTool(`${baseUrl}/checksums.txt.sigstore.json`);
|
||||||
|
} catch (e) {
|
||||||
|
core.warning(`Skipping cosign signature verification: unable to download sigstore bundle: ${e.message}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const certificateIdentity = getCertificateIdentity(distribution, tag);
|
||||||
|
core.info(`Verifying checksums.txt signature with cosign (identity: ${certificateIdentity})`);
|
||||||
|
await exec.exec(cosign, [
|
||||||
|
'verify-blob',
|
||||||
|
'--certificate-identity',
|
||||||
|
certificateIdentity,
|
||||||
|
'--certificate-oidc-issuer',
|
||||||
|
'https://token.actions.githubusercontent.com',
|
||||||
|
'--bundle',
|
||||||
|
bundlePath,
|
||||||
|
checksumsPath
|
||||||
|
]);
|
||||||
|
core.info('cosign signature verified');
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getCertificateIdentity = (distribution: string, tag: string): string => {
|
||||||
|
const pro = isPro(distribution);
|
||||||
|
if (github.isNightlyTag(tag)) {
|
||||||
|
const workflow = pro ? 'nightly-pro.yml' : 'nightly-oss.yml';
|
||||||
|
const repo = pro ? 'goreleaser-pro-internal' : 'goreleaser';
|
||||||
|
return `https://github.com/goreleaser/${repo}/.github/workflows/${workflow}@refs/heads/main`;
|
||||||
|
}
|
||||||
|
if (pro) {
|
||||||
|
return `https://github.com/goreleaser/goreleaser-pro-internal/.github/workflows/release-pro.yml@refs/tags/${tag}`;
|
||||||
|
}
|
||||||
|
return `https://github.com/goreleaser/goreleaser/.github/workflows/release.yml@refs/tags/${tag}`;
|
||||||
|
};
|
||||||
|
|
||||||
export const distribSuffix = (distribution: string): string => {
|
export const distribSuffix = (distribution: string): string => {
|
||||||
return isPro(distribution) ? '-pro' : '';
|
return isPro(distribution) ? '-pro' : '';
|
||||||
};
|
};
|
||||||
|
|
@ -69,6 +151,7 @@ const getFilename = (distribution: string): string => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'arm': {
|
case 'arm': {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const arm_version = (process.config.variables as any).arm_version;
|
const arm_version = (process.config.variables as any).arm_version;
|
||||||
arch = arm_version ? 'armv' + arm_version : 'arm';
|
arch = arm_version ? 'armv' + arm_version : 'arm';
|
||||||
break;
|
break;
|
||||||
|
|
@ -84,7 +167,7 @@ const getFilename = (distribution: string): string => {
|
||||||
const platform: string = context.osPlat == 'win32' ? 'Windows' : context.osPlat == 'darwin' ? 'Darwin' : 'Linux';
|
const platform: string = context.osPlat == 'win32' ? 'Windows' : context.osPlat == 'darwin' ? 'Darwin' : 'Linux';
|
||||||
const ext: string = context.osPlat == 'win32' ? 'zip' : 'tar.gz';
|
const ext: string = context.osPlat == 'win32' ? 'zip' : 'tar.gz';
|
||||||
const suffix: string = distribSuffix(distribution);
|
const suffix: string = distribSuffix(distribution);
|
||||||
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);
|
return `goreleaser${suffix}_${platform}_${arch}.${ext}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function getDistPath(yamlfile: string): Promise<string> {
|
export async function getDistPath(yamlfile: string): Promise<string> {
|
||||||
|
|
|
||||||
20
src/main.ts
20
src/main.ts
|
|
@ -1,16 +1,19 @@
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
|
import type {Arguments} from 'yargs';
|
||||||
import * as context from './context';
|
import * as context from './context';
|
||||||
import * as goreleaser from './goreleaser';
|
import * as goreleaser from './goreleaser';
|
||||||
|
import {getRequestedVersion} from './version';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const inputs: context.Inputs = await context.getInputs();
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
const bin = await goreleaser.install(inputs.distribution, inputs.version, inputs.githubToken);
|
const version = getRequestedVersion(inputs);
|
||||||
core.info(`GoReleaser ${inputs.version} installed successfully`);
|
const bin = await goreleaser.install(inputs.distribution, version);
|
||||||
|
core.info(`GoReleaser ${version} installed successfully`);
|
||||||
|
|
||||||
if (inputs.installOnly) {
|
if (inputs.installOnly) {
|
||||||
const goreleaserDir = path.dirname(bin);
|
const goreleaserDir = path.dirname(bin);
|
||||||
|
|
@ -28,11 +31,20 @@ async function run(): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let yamlfile: string | unknown;
|
let yamlfile: string | unknown;
|
||||||
const argv = yargs.parse(inputs.args);
|
const argv: Arguments<{config?: string}> = yargs(inputs.args).parseSync() as Arguments<{
|
||||||
|
config?: string;
|
||||||
|
}>;
|
||||||
if (argv.config) {
|
if (argv.config) {
|
||||||
yamlfile = argv.config;
|
yamlfile = argv.config;
|
||||||
} else {
|
} else {
|
||||||
['.goreleaser.yaml', '.goreleaser.yml', 'goreleaser.yaml', 'goreleaser.yml'].forEach(f => {
|
[
|
||||||
|
'.config/goreleaser.yaml',
|
||||||
|
'.config/goreleaser.yml',
|
||||||
|
'.goreleaser.yaml',
|
||||||
|
'.goreleaser.yml',
|
||||||
|
'goreleaser.yaml',
|
||||||
|
'goreleaser.yml'
|
||||||
|
].forEach(f => {
|
||||||
if (fs.existsSync(f)) {
|
if (fs.existsSync(f)) {
|
||||||
yamlfile = f;
|
yamlfile = f;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import tmp = require('tmp');
|
import * as tmp from 'tmp';
|
||||||
|
|
||||||
tmp.setGracefulCleanup();
|
tmp.setGracefulCleanup();
|
||||||
const tmpdir = tmp.dirSync({template: 'goreleaser-XXXXXX'});
|
const tmpdir = tmp.dirSync({template: 'goreleaser-XXXXXX'});
|
||||||
|
|
|
||||||
56
src/version.ts
Normal file
56
src/version.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import {Inputs} from './context';
|
||||||
|
|
||||||
|
// Resolves the GoReleaser version to install.
|
||||||
|
//
|
||||||
|
// When `version-file` is set, it is read from disk and parsed; the resolved
|
||||||
|
// value takes precedence over the `version` input. Otherwise, `version` is
|
||||||
|
// returned as-is (it always has a default — see context.getInputs).
|
||||||
|
export function getRequestedVersion(inputs: Inputs): string {
|
||||||
|
if (!inputs.versionFile) {
|
||||||
|
return inputs.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
const filePath = path.isAbsolute(inputs.versionFile)
|
||||||
|
? inputs.versionFile
|
||||||
|
: path.join(inputs.workdir || '.', inputs.versionFile);
|
||||||
|
|
||||||
|
if (!fs.existsSync(filePath)) {
|
||||||
|
throw new Error(`version-file not found: ${filePath}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const basename = path.basename(filePath);
|
||||||
|
const content = fs.readFileSync(filePath, 'utf-8');
|
||||||
|
|
||||||
|
switch (basename) {
|
||||||
|
case '.tool-versions':
|
||||||
|
return parseToolVersions(content, filePath);
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported version-file: ${filePath} (only .tool-versions is supported)`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parses a single `goreleaser <version>` entry out of a `.tool-versions` file
|
||||||
|
// (asdf/mise format). Full-line `#` comments and inline `# ...` suffixes are
|
||||||
|
// stripped. When a tool lists multiple fallback versions only the first is
|
||||||
|
// used. Bare semvers are returned with a leading `v`; constraint expressions
|
||||||
|
// (`~> v2`, `latest`, ...) are returned as-is.
|
||||||
|
function parseToolVersions(content: string, filePath: string): string {
|
||||||
|
for (const rawLine of content.split('\n')) {
|
||||||
|
const line = rawLine.replace(/#.*$/, '').trim();
|
||||||
|
if (!line) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const tokens = line.split(/\s+/);
|
||||||
|
if (tokens[0] !== 'goreleaser') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const version = tokens[1];
|
||||||
|
if (!version) {
|
||||||
|
throw new Error(`No version specified for goreleaser in ${filePath}`);
|
||||||
|
}
|
||||||
|
return /^\d/.test(version) ? `v${version}` : version;
|
||||||
|
}
|
||||||
|
throw new Error(`No goreleaser entry found in ${filePath}`);
|
||||||
|
}
|
||||||
|
|
@ -17,12 +17,6 @@ builds:
|
||||||
- "386"
|
- "386"
|
||||||
- "amd64"
|
- "amd64"
|
||||||
|
|
||||||
archives:
|
|
||||||
-
|
|
||||||
format_overrides:
|
|
||||||
- goos: windows
|
|
||||||
format: zip
|
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,5 @@ builds:
|
||||||
- "386"
|
- "386"
|
||||||
- "amd64"
|
- "amd64"
|
||||||
|
|
||||||
archives:
|
|
||||||
-
|
|
||||||
format_overrides:
|
|
||||||
- goos: windows
|
|
||||||
format: zip
|
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,18 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es6",
|
"esModuleInterop": true,
|
||||||
"module": "commonjs",
|
"target": "ES2024",
|
||||||
|
"module": "ESNext",
|
||||||
"newLine": "lf",
|
"newLine": "lf",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"useUnknownInCatchVariables": false,
|
"useUnknownInCatchVariables": false,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"strict": false,
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue