saucectl_release #472
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
# This workflow is triggered by https://github.com/saucelabs/saucectl on release. | |
name: Release | |
on: [repository_dispatch] | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Event Information | |
run: echo "Event '${{ github.event.action }}' received from '${{ github.event.client_payload.version }}'" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install Dependencies | |
run: npm install | |
- name: NPM Setup | |
run: | | |
npm set registry "https://registry.npmjs.org/" | |
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
npm whoami | |
- name: Git Setup | |
run: | | |
git config --global user.name "oss-sauce-bot" | |
git config --global user.email "[email protected]" | |
- if: github.event.client_payload.version != '' | |
run: npx np ${{ github.event.client_payload.version }} | |
post-deploy-install: | |
needs: ["deploy"] | |
if: github.event.client_payload.version != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Event Information | |
run: echo "Event '${{ github.event.action }}' received from '${{ github.event.client_payload.version }}'" | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install saucectl | |
run: npm install saucectl@${{ github.event.client_payload.version }} |