mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-14 23:00:33 +00:00
Use ncc and clean workflows
This commit is contained in:
parent
1f2ea644cc
commit
168bf72554
9 changed files with 27201 additions and 91 deletions
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
|
@ -14,10 +14,6 @@ jobs:
|
|||
# https://github.com/actions/checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
-
|
||||
# https://github.com/actions/setup-node
|
||||
name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
-
|
||||
name: Setup TS
|
||||
run: npm install tslint typescript -g
|
||||
|
|
|
|||
72
.github/workflows/release.yml
vendored
72
.github/workflows/release.yml
vendored
|
|
@ -1,72 +0,0 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- '**'
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
# https://github.com/actions/checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
-
|
||||
name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
TAG=${GITHUB_REF#refs/tags/}
|
||||
MINOR=${TAG%.*}
|
||||
MAJOR=${MINOR%.*}
|
||||
echo ::set-output name=tag_name::${TAG}
|
||||
echo ::set-output name=minor_tag::${MINOR}
|
||||
echo ::set-output name=major_tag::${MAJOR}
|
||||
echo ::set-output name=major_exists::$(git show-ref origin/releases/${MAJOR})
|
||||
-
|
||||
name: Set up Git
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config user.name "${GITHUB_ACTOR}"
|
||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||
-
|
||||
name: Checkout releases/${{ steps.prepare.outputs.major_tag }} branch
|
||||
run: |
|
||||
git checkout -B releases/${{ steps.prepare.outputs.major_tag }}
|
||||
if [ -n "${{ steps.prepare.outputs.major_exists }}" ]; then
|
||||
git branch --set-upstream-to=origin/releases/${{ steps.prepare.outputs.major_tag }} releases/${{ steps.prepare.outputs.major_tag }}
|
||||
fi
|
||||
-
|
||||
# https://github.com/actions/setup-node
|
||||
name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
-
|
||||
name: NPM production deps
|
||||
run: |
|
||||
npm run build-dep
|
||||
npm run prune
|
||||
-
|
||||
name: Commit and push changes
|
||||
run: |
|
||||
git add --all
|
||||
git status --short -uno
|
||||
git commit -m 'Release ${{ steps.prepare.outputs.tag_name }}'
|
||||
git show --stat-count=10 HEAD
|
||||
git push -f origin releases/${{ steps.prepare.outputs.major_tag }}
|
||||
-
|
||||
name: Update ${{ steps.prepare.outputs.minor_tag }} tag
|
||||
run: |
|
||||
git push origin :refs/tags/${{ steps.prepare.outputs.minor_tag }}
|
||||
git tag -fa ${{ steps.prepare.outputs.minor_tag }} -m "Release ${{ steps.prepare.outputs.tag_name }}"
|
||||
git push origin ${{ steps.prepare.outputs.minor_tag }}
|
||||
-
|
||||
name: Update ${{ steps.prepare.outputs.major_tag }} tag
|
||||
run: |
|
||||
git push origin :refs/tags/${{ steps.prepare.outputs.major_tag }}
|
||||
git tag -fa ${{ steps.prepare.outputs.major_tag }} -m "Release ${{ steps.prepare.outputs.tag_name }}"
|
||||
git push origin ${{ steps.prepare.outputs.major_tag }}
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
|
@ -18,6 +18,11 @@ jobs:
|
|||
# https://github.com/actions/checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
-
|
||||
name: Install
|
||||
run: npm ci
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue