Skip to content

Commit

Permalink
feat: manual action
Browse files Browse the repository at this point in the history
  • Loading branch information
vadson71 committed Mar 17, 2023
1 parent e8f6480 commit ef08eae
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/deploy_maual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Manual NPM deploy

on:
# Trigger the workflow only manually
workflow_dispatch:

# env:
# GHR_PROJECT_REPONAME: ui5-language-assistant
# GHR_PROJECT_USERNAME: SAP

jobs:
# build:
# # if: github.repository == 'SAP/ui5-language-assistant' && github.ref == 'refs/heads/master'
# if: github.repository == 'vadson71/ui5-language-assistant-vk' && 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
# with:
# fetch-depth: 0 # will fetch all history
# - name: Run install
# uses: borales/actions-yarn@v4
# with:
# cmd: install # will run `yarn install` command
# - name: Run build
# uses: borales/actions-yarn@v4
# with:
# cmd: ci # will run `yarn run ci` command

# - name: Upload vsix artifact
# uses: actions/upload-artifact@v3
# with:
# name: vscode-extension-file
# path: ./packages/vscode-ui5-language-assistant/vscode-ui5-language-assistant*.vsix
# if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

# # Get release version number
# - name: get-npm-version
# id: package-version
# uses: martinbeentjes/npm-get-version-action@main
# with:
# path: ./packages/vscode-ui5-language-assistant

deploy-npm:
if: github.repository == 'vadson71/ui5-language-assistant-vk' && github.ref == 'refs/heads/feat/migrate-to-github-actions'
strategy:
matrix:
os: [ubuntu-latest]
node-version: [14.x]
runs-on: ${{ matrix.os }}
# needs: build

steps:
- name: Prerequisite
run: sudo apt-get install libxss1

- name: Checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # will fetch all history

# Pure lockfile simply doesn't write the lockfile if it has changes.
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install --pure-lockfile

# reuse stored generated vsix
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: vscode-extension-file
path: ./packages/vscode-ui5-language-assistant-bas-ext

- name: Check
run: ls ./packages/vscode-ui5-language-assistant-bas-ext -la

- 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
# # https://github.com/lerna/lerna/issues/2788
# uses: borales/actions-yarn@v4
# with:
# cmd: run release:publish --no-verify-access


0 comments on commit ef08eae

Please sign in to comment.