Skip to content

Commit

Permalink
ci: add release-github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
k3nsei committed Apr 27, 2023
1 parent e71431f commit 04b8065
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: release

on:
release:
types: [published]
workflow_dispatch:
inputs:
reason:
description: Why was the workflow triggered manually?
required: true
type: string

permissions:
contents: read
packages: write
id-token: write

jobs:
publish-to-github:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js and install NPM dependencies
uses: ./.github/actions/install-npm-deps
with:
node-version: 'lts/*'
registry-url: 'https://npm.pkg.github.com'
scope: '@k3nsei'

- name: Build library
run: npm run build:lib

- name: Copy license and readme files
run: |
cp LICENSE dist/ng-in-viewport/LICENSE
cp README.md dist/ng-in-viewport/README.md
- name: Publish library package
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd dist/ng-in-viewport
npm publish --registry="https://npm.pkg.github.com" --scope="@k3nsei"

1 comment on commit 04b8065

@vercel
Copy link

@vercel vercel bot commented on 04b8065 Apr 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ng-in-viewport – ./

ng-in-viewport-k3nsei.vercel.app
ng-in-viewport.vercel.app
ng-in-viewport-git-develop-k3nsei.vercel.app

Please sign in to comment.