Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Release to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Jul 18, 2021
1 parent 9a314f6 commit 86c9372
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
# This job runs when a new release is published
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "15"
registry-url: https://registry.npmjs.org
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
# Store the name of the release
# See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- run: npm i
- run: npm version $RELEASE_VERSION --no-git-tag-version
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@bref.sh/live",
"description": "Edit code live on Lambda",
"version": "0.1.0",
"homepage": "https://github.com/brefphp/live",
"repository": "https://github.com/brefphp/live",
"license": "MIT",
"dependencies": {
"anymatch": "^3.1.2",
Expand Down

0 comments on commit 86c9372

Please sign in to comment.