Skip to content

Merge pull request #17 from ethereum-optimism/snapshots #1

Merge pull request #17 from ethereum-optimism/snapshots

Merge pull request #17 from ethereum-optimism/snapshots #1

Workflow file for this run

name: Release and version
on:
workflow_dispatch:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-release:
name: Release
runs-on: ubuntu-latest
if: github.repository == 'ethereum-optimism/super-cli'
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "main"
- name: Setup
uses: ./.github/actions/setup
- name: Check if NPM_TOKEN is set
id: check_token
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "NPM_TOKEN is not set. Is it set it in your repository secrets?"
exit 1
fi
shell: bash
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Verify NPM Token is valid
run: npm whoami
- name: Publish To NPM or Create Release Pull Request
uses: changesets/action@v1
id: changesets
with:
createGithubReleases: false
publish: pnpm release:publish
version: pnpm release:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}