Skip to content

cicd: add ability to use next release for snapshot #15

cicd: add ability to use next release for snapshot

cicd: add ability to use next release for snapshot #15

name: Release a snapshot
on:
# Only manual workflow trigger
workflow_dispatch:
inputs:
includeNext:
description: 'include "next" version of contracts'
default: 'true'
type: boolean
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release-snapshot:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.11.0]
steps:

Check failure on line 20 in .github/workflows/release-snapshot.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-snapshot.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8.15.5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set relevant environment variables
run: |
if [[ ${{ github.event.inputs.includeNext }} == 'true' ]]; then
echo "COLONY_CONTRACTOR_INCLUDE_NEXT=true" >> $GITHUB_ENV
fi
- name: Create .npmrc (to be logged in for publishing)
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm run bootstrap
- run: pnpm run lint
- run: pnpm run build
env:
NODE_OPTIONS: --max-old-space-size=4096
- run: pnpm run test
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
- name: Version snapshot
run: npx changeset version --snapshot snapshot && pnpm install --lockfile-only
- name: Publish snapshot to npm
run: npx changeset publish --snapshot --tag snapshot --no-git-tag