Skip to content

fix: auth

fix: auth #10

Workflow file for this run

name: CI
on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
push: # Runs whenever a commit is pushed to the repository
branches: [experience-cs]
permissions:
contents: write # publish a GitHub release
pages: write # deploy to GitHub Pages
issues: write # comment on released issues
pull-requests: write # comment on released pull requests
packages: write # deploy to GitHub Packages
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.compare || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
ci:
name: Detect affected packages, build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
cache: "npm"
node-version-file: ".nvmrc"
registry-url: "https://npm.pkg.github.com"
- uses: wagoid/commitlint-github-action@9763196e10f27aef304c9b8b660d31d97fce0f99 # v5
- name: Debug info
run: |
cat <<EOF
Scratch environment: ${{ vars.SCRATCH_ENV || '<none>' }}
Node version: $(node --version)
NPM version: $(npm --version)
GitHub ref: ${{ github.ref }}
GitHub head ref: ${{ github.head_ref }}
Working directory: $(pwd)
EOF
- name: Build and test scratch-gui
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./packages/scratch-gui
run: |
npm ci
npm run build
npm run test
- name: Publish scratch-gui to GitHub Packages
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./packages/scratch-gui
run: |
RELEASE_VERSION="0.1.0-experience-cs.$(date +'%Y%m%d%H%M%S')"
npm version --no-git-tag-version $RELEASE_VERSION
npm publish --access public --tag latest