Skip to content

Commit 47eb215

Browse files
committed
Merge branch 'gh-actions'
* gh-actions: release prereleases Remove brew-publish dep Rely on gh actions for releasing
2 parents 6533b8b + daafdfd commit 47eb215

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

.github/workflows/release.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
name: Release
2-
on: { push: { tags: 'v[0-9]+.[0-9]+.[0-9]+' } }
2+
on: { push: { tags: 'v[0-9]+.[0-9]+.[0-9]+*' } }
3+
4+
env:
5+
PRERELEASE: ${{ contains(github.ref, '-') }}
36

47
jobs:
58
github:
69
runs-on: ubuntu-latest
710
steps:
811
- uses: jasonkarns/create-release@master
12+
with:
13+
prerelease: ${{ env.PRERELEASE }}
914

1015
homebrew:
1116
runs-on: ubuntu-latest
1217
steps:
1318
- uses: mislav/bump-homebrew-formula-action@v1
19+
if: ${{ ! env.PRERELEASE }} # this is meant to guard the entire job but workflow-level env vars are buggy
1420
with:
1521
formula-name: node-build-update-defs
1622
homebrew-tap: nodenv/nodenv
@@ -25,6 +31,11 @@ jobs:
2531
with:
2632
scope: nodenv
2733
registry-url: https://registry.npmjs.org
34+
- run: npm publish --tags next
35+
if: ${{ env.PRERELEASE }}
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
2838
- run: npm publish
39+
if: ${{ ! env.PRERELEASE }} # TODO: find a way to simplify this
2940
env:
3041
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}

package-lock.json

+6-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,12 @@
3636
"lint": "npm run lint:js && npm run lint:shell",
3737
"lint:js": "prettier-standard '**/*.js' && standard --fix",
3838
"lint:shell": "git ls-files bin | xargs shellcheck",
39-
"postversion": "npm publish",
40-
"prepublishOnly": "npm run publish:github && npm run publish:brew",
41-
"publish:brew": "brew-publish",
42-
"publish:github": "git push --follow-tags"
39+
"postversion": "git push --follow-tags"
4340
},
4441
"engines": {
4542
"node": ">=6"
4643
},
4744
"devDependencies": {
48-
"brew-publish": "^2.3.1",
4945
"prettier-standard": "^16.4.1",
5046
"standard": "^14.3.4"
5147
}

0 commit comments

Comments
 (0)