Skip to content

Commit 5623aa4

Browse files
committed
core: add release step in CI to push packed tarballs to GH release
As part of #18 this is a test to try to push tarballs generated by oclif to a Github Release. The idea would for the release process to be the following: - locally on a developer machine, bump the version, commit, tag and publish to npm: ``` npm run publish -- --no-release-draft 2.0.1 ``` - once the tag is pushed, the CI kicks in by doing the following: - Github release creation with upload of tarballs with this [github action](https://github.com/softprops/action-gh-release)
1 parent fe8c7f5 commit 5623aa4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows: [ "Developer checks" ]
5+
types: [ completed ]
6+
jobs:
7+
release:
8+
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/v')
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node_version: [ '15' ]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Cache node modules
16+
uses: actions/cache@v2
17+
env:
18+
cache-name: cache-node-modules
19+
with:
20+
# npm cache files are stored in `~/.npm` on Linux/macOS
21+
path: ~/.npm
22+
key: node-${{ matrix.node_version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
node-${{ matrix.node_version }}-build-${{ env.cache-name }}-
25+
- uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node_version }}
28+
- run: npm ci
29+
- run: npm run pack
30+
- name: Release
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
files: dist/**/*
34+
draft: true
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GITHUB_REPOSITORY: paulrbr/bump-node-cli

0 commit comments

Comments
 (0)