Manual latest release deploy to npmjs #24
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: Manual latest release deploy to npmjs | |
on: | |
# Trigger the workflow only manually | |
workflow_dispatch: | |
jobs: | |
deploy-npm: | |
if: github.repository == 'SAP/ui5-language-assistant' && github.ref == 'refs/heads/master' | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [14.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code repository | |
uses: actions/checkout@v3 | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Download latest released artifact | |
uses: robinraju/[email protected] | |
with: | |
latest: true | |
token: ${{ secrets.ACCESS_PAT }} | |
fileName: "vscode-ui5-language-assistant-*.vsix" | |
out-file-path: "./packages/vscode-ui5-language-assistant-bas-ext" | |
- name: List folder content | |
run: ls ./packages/vscode-ui5-language-assistant-bas-ext -la | |
- name: Check file existence | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: "./packages/vscode-ui5-language-assistant-bas-ext/*.vsix" | |
fail: true | |
- name: Prepare .npmrc | |
run: | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
# To help debug when lerna detects changes to the working tree and fails the publish | |
- name: Status | |
run: git status | |
- name: Publish | |
env: | |
HUSKY_SKIP: "true" | |
# https://github.com/lerna/lerna/issues/2788 | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: release:publish --no-verify-access | |