Merge branch 'main' into main #4
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: yarn | |
on: | |
push: | |
branches: ["*"] | |
tags: ["*"] | |
pull_request: null | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node-version: ['lts/*'] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- run: yarn install --immutable # TODO: cache and apply --immutable-cache --check-cache | |
- run: yarn build | |
- id: account-aws-kms-changes | |
uses: tj-actions/changed-files@v41.0.1 | |
with: | |
files: "@planetarium/account-aws-kms" | |
- name: Run yarn test w/o AWS cred for PR unrelated to account-aws-kms | |
if: | | |
github.event_name == 'pull_request' && | |
steps.account-aws-kms-changes.outputs.any_changed != 'true' | |
run: yarn test | |
- name: Run yarn test w/ AWS cred for push and PR related to account-aws-kms | |
if: | | |
github.event_name != 'pull_request' || | |
steps.account-aws-kms-changes.outputs.any_changed == 'true' | |
run: yarn test | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
- run: yarn pack-all | |
libplanet-tools-npm-install-test: | |
name: "@planetarium/cli installation test" | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required for the latest-tag action | |
- id: latest-tag | |
name: Get the latest tag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
with: | |
fallback: 1.0.0 | |
- if: runner.os != 'Windows' | |
run: | | |
set -ev | |
cd Libplanet.Tools/ | |
bin/npm-test.sh "$LATEST_VERSION" | |
env: | |
LATEST_VERSION: ${{ steps.latest-tag.outputs.tag }} | |
- if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
$ErrorActionPreference = "Stop" | |
cd Libplanet.Tools\ | |
pwsh ` | |
-ExecutionPolicy Bypass ` | |
-File bin\npm-test.ps1 ` | |
-Version $env:LATEST_VERSION | |
env: | |
LATEST_VERSION: ${{ steps.latest-tag.outputs.tag }} |