Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
ci: pre-release workflow and other release improvements (#19)
Browse files Browse the repository at this point in the history
* ci: publish github releases

* ci: test and build before release

* ci: pre-release workflow
  • Loading branch information
tracernz authored Jul 30, 2023
1 parent 64e4f60 commit 28ebe5c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pre-Release NPM

on:
push:
tags:
- 'v*-rc*'
- 'v*-alpha*'
- 'v*-beta*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run test
- run: npm run build
# Publish to npm
- run: npm publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- 'v*'
- '!v*-rc*'
- '!v*-alpha*'
- '!v*-beta*'

jobs:
build:
Expand All @@ -14,8 +17,20 @@ jobs:
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm ci
- run: npm run test
- run: npm run build
# Publish to npm
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit 28ebe5c

Please sign in to comment.