mirror of
https://github.com/bendtherules/completion-viz.git
synced 2026-08-18 13:42:51 +00:00
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: Publish Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
publish-gpr:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Set everything up
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 12
|
|
registry-url: https://npm.pkg.github.com/
|
|
scope: '@engine262'
|
|
always-auth: true # required if using yarn
|
|
- run: git submodule update --init --recursive
|
|
|
|
# Run tests and whatnot
|
|
- run: npm install
|
|
- run: npm run build
|
|
- run: npm run lint
|
|
- run: npm run coverage
|
|
env:
|
|
CONTINUOUS_INTEGRATION: 1
|
|
|
|
# Upload coverage data
|
|
- name: Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{github.token}}
|
|
|
|
# Publish built package
|
|
- run: npm publish --access=public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{github.token}}
|
|
|
|
# Push build to to gh-pages
|
|
- run: |
|
|
git config --global user.email "gha@example.com"
|
|
git config --global user.name "GHA"
|
|
git remote add github "https://$GITHUB_ACTOR:$BETTER_GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
|
|
git fetch github
|
|
git checkout gh-pages
|
|
cp dist/* .
|
|
git add engine262.*
|
|
git commit -m "autobuild" || exit 0 # exit silently if nothing changed
|
|
git push -u github gh-pages
|
|
env:
|
|
BETTER_GITHUB_TOKEN: ${{secrets.BETTER_GITHUB_TOKEN}}
|