Delete .github/workflows/licenses.yml

This commit is contained in:
Andy Feller 2024-11-06 23:18:43 -05:00 committed by GitHub
parent e629443a2c
commit 54c0739659
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,40 +0,0 @@
name: Licensing
on:
push:
tags:
- "v*"
env:
LICENSE_DIR: licenses
LICENSE_ARCHIVE: licenses.tgz
jobs:
go-licenses:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Generate Go license notices
run: |
go install github.com/google/go-licenses@latest
GOROOT=$(go env GOROOT) go-licenses save ./... --stderrthreshold=ERROR --logtostderr=false --save_path "$LICENSE_DIR"
GOROOT=$(go env GOROOT) go-licenses report ./... --template=.github/licenses.tmpl --stderrthreshold=ERROR --logtostderr=false > "$LICENSE_DIR"/README.md
- name: Upload Go license notices
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tar czf "$LICENSE_ARCHIVE" "$LICENSE_DIR"
gh release upload "$GITHUB_REF_NAME" --clobber -- "$LICENSE_ARCHIVE"
if gh release view "$GITHUB_REF_NAME" >/dev/null; then
echo "uploading assets to an existing release..."
gh release upload "$GITHUB_REF_NAME" --clobber -- "$LICENSE_ARCHIVE"
else
echo "cannot upload as something else should create the release first..."
exit 1
fi