Skip to content

Commit

Permalink
core: add release step in CI to push packed tarballs to GH release
Browse files Browse the repository at this point in the history
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 and tag:

  ```
  npm run publish -- --no-publish --no-release-draft 2.0.1
  ```

- once the tag is pushed, the CI kicks in by doing the following:
  - `npm publish` to publish package on NPM (TODO this needs to be tested)
  - Github release creation with upload of tarballs with this
    [github action](https://github.com/softprops/action-gh-release)
  • Loading branch information
paulRbr committed May 25, 2021
1 parent c29f816 commit 7cd2a23
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [ '15' ]
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: node-${{ matrix.node_version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node-${{ matrix.node_version }}-build-${{ env.cache-name }}-
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- run: npm ci
- run: npm run pack
# - run: npm publish
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/**/*
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: paulrbr/bump-node-cli

0 comments on commit 7cd2a23

Please sign in to comment.