chore(renovate): rename to .jsonc
to use comments (#28)
#21
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: deploy-main | |
on: | |
push: | |
branches: ["main"] | |
env: | |
CI: 1 | |
TURBO_TELEMETRY_DISABLED: 1 | |
GITHUB_BASE_REF: ${{ github.base_ref }} | |
GITHUB_HEAD_REF: ${{ github.head_ref }} | |
GITHUB_REF: ${{ github.ref }} | |
NPM_CONFIG_PROVENANCE: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: wasm32-unknown-unknown | |
cache: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install | |
run: | | |
npm install -g corepack@latest | |
corepack enable && corepack prepare | |
corepack pnpm config set store-dir .pnpm-store | |
corepack pnpm install --frozen-lockfile | |
- name: build | |
run: | | |
corepack pnpm turbo --filter !@lynx-js/web-tests build --summarize | |
- name: Save Turbo Result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: main-${{ github.sha }} | |
path: .turbo | |
if-no-files-found: error | |
retention-days: 1 | |
overwrite: true | |
include-hidden-files: true | |
# We make a build here to make sure cache works for pull requests | |
# See: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache | |
build-all: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
uses: ./.github/workflows/workflow-build.yml | |
secrets: inherit | |
with: | |
runs-on: lynx-ubuntu-24.04-xlarge | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
environment: main branch | |
permissions: | |
contents: write | |
pull-requests: write | |
statuses: read | |
# `id-token: write` is required for npm provenance | |
# See: https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install | |
run: | | |
npm install -g corepack@latest | |
corepack enable && corepack prepare | |
corepack pnpm config set store-dir .pnpm-store | |
corepack pnpm install --frozen-lockfile | |
- name: Download Turbo Cache | |
uses: actions/download-artifact@v4 | |
timeout-minutes: 5 | |
with: | |
name: main-${{ github.sha }} | |
path: .turbo | |
- name: build | |
run: | | |
corepack pnpm turbo --filter !@lynx-js/web-tests build --summarize | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date -u +'%Y-%m-%d %H:%M:%S')" | |
- name: attempt to release | |
uses: changesets/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
publish: pnpm changeset publish | |
title: "chore: Release ${{ steps.date.outputs.date }}" | |
canary-publish: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: main branch | |
permissions: | |
contents: read | |
pull-requests: read | |
statuses: read | |
# `id-token: write` is required for npm provenance | |
# See: https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install | |
run: | | |
npm install -g corepack@latest | |
corepack enable && corepack prepare | |
corepack pnpm config set store-dir .pnpm-store | |
corepack pnpm install --frozen-lockfile | |
- name: Download Turbo Cache | |
uses: actions/download-artifact@v4 | |
timeout-minutes: 5 | |
with: | |
name: main-${{ github.sha }} | |
path: .turbo | |
- name: build | |
run: | | |
corepack pnpm turbo --filter !@lynx-js/web-tests build --summarize | |
- name: version canary packages | |
run: | | |
pnpm changeset version --snapshot canary | |
node packages/tools/canary-release/snapshot.js | |
- name: publish canary packages | |
run: | | |
pnpm --recursive publish --no-git-checks --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |