Update dev tag to latest #12
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: Update dev tag to latest | |
on: | |
workflow_dispatch: | |
inputs: | |
trigger-manual: | |
description: 'Manually trigger the workflow' | |
jobs: | |
update-tags: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
# List the packages to run here. The matrix will run one job for each package parallelly. | |
- api-augment | |
- types | |
- config | |
- adapter | |
- sdk-types | |
- sdk | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: 🔐 Authenticate with NPM | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }}" > ~/.npmrc | |
- name: Get dev version of ${{ matrix.package }} | |
id: get-version | |
run: | | |
dev_version=$(npm show @oak-network/${{ matrix.package }}@dev version) | |
echo "Dev version: $dev_version" | |
echo "::set-output name=dev_version::$dev_version" | |
- name: Point latest tag to ${{ steps.get-version.outputs.dev_version }} | |
run: | | |
npm dist-tag add @oak-network/${{ matrix.package }}@${{ steps.get-version.outputs.dev_version }} latest --registry=https://registry.npmjs.org/ | |
echo "Latest tag set to ${{ steps.get-version.outputs.dev_version }}" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }} |