Skip to content

chore: Release Noir(1.0.0-beta.19) #32104

chore: Release Noir(1.0.0-beta.19)

chore: Release Noir(1.0.0-beta.19) #32104

Workflow file for this run

name: Deploy preview for PR
on:
pull_request:
merge_group:
jobs:
add_label:
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request'
permissions:
pull-requests: write
outputs:
has_label: ${{ steps.check-labels.outputs.result }}
steps:
- name: Check if label is present
id: check-labels
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (labels.includes('documentation')) {
return true;
}
// Fetch the list of files changed in the PR
const { data: files } = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100
});
// Check if any file is within the 'docs' folder
const docsChanged = files.some(file => file.filename.startsWith('docs/'));
return docsChanged;
- name: Add label if not present
if: steps.check-labels.outputs.result == 'true'
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (!labels.includes('documentation')) {
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['documentation']
})
}
build_preview:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup toolchain
uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: false
save-if: false
- name: Install Repo Yarn's Dependencies
uses: ./.github/actions/setup
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22.15.0'
cache: 'yarn'
cache-dependency-path: 'docs/yarn.lock'
- name: Install docs dependencies
working-directory: docs
run: yarn install --immutable
- name: Query active docs versions
working-directory: docs
run: yarn version::stables
- name: Build docs
working-directory: docs
env:
ENV: staging # not really a secret, it will show in the footer anyway
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: docs
path: ./docs/build/
retention-days: 3
deploy_preview:
needs: [build_preview, add_label]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
if: needs.add_label.outputs.has_label == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download built docs
uses: actions/download-artifact@v7
with:
name: docs
path: ./docs/build
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: "./docs/build"
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for PR ${{ github.event.number }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
add_comment:
needs: [deploy_preview]
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- name: Tag dev rel in comment
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
FYI @noir-lang/developerrelations on Noir doc changes.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}