Merge pull request #58 from scott-the-programmer/dependabot/npm_and_y… #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Backstage plugins to npm | |
on: | |
push: | |
branches: | |
- main | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@scott-the-programmer' | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: make install | |
- name: Lint | |
run: make lint | |
- name: Tests | |
run: make test | |
- name: Build plugins | |
run: make build | |
- name: Publish frontend | |
run: | | |
make build-frontend | |
cd spacelift | |
yarn publish --access public || true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish backend | |
run: | | |
make build-backend | |
cd spacelift-backend | |
yarn publish --access public || true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |