Update TS bindings output for variants (#1180) #100
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: "publish" | |
on: | |
# Run using manual triggers from GitHub UI: | |
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow | |
workflow_dispatch: {} | |
# Run on pushes to 'main' branch': | |
push: | |
branches: | |
- "main" | |
# Wait for any other publish workflows in-progress to complete, before starting a new one: | |
concurrency: | |
group: "${{ github.workflow }}" | |
cancel-in-progress: false | |
jobs: | |
publish: | |
runs-on: "ubuntu-22.04" # _SLANG_DEV_CONTAINER_BASE_IMAGE_ (keep in sync) | |
# Only run on the main repo (not forks), and only on the 'main' branch: | |
if: "${{ github.repository == 'NomicFoundation/slang' && github.ref_name == 'main' }}" | |
permissions: | |
contents: "write" # to create new branches and releases | |
pull-requests: "write" # to create new pull requests for changesets | |
steps: | |
- name: "Checkout Repository" | |
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" | |
- name: "Restore Cache" | |
uses: "./.github/actions/cache/restore" | |
- name: "infra publish changesets" | |
uses: "./.github/actions/devcontainer/run" | |
with: | |
runCmd: "./scripts/bin/infra publish changesets" | |
env: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- name: "Create/Update Changesets Pull Request" | |
id: "runChangesets" | |
uses: "changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308" | |
with: | |
title: "Bump Slang Version" | |
commit: "Bump Slang Version" | |
createGithubReleases: false | |
version: "git stash pop" # Stash created by 'infra publish changesets' | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: "infra publish mkdocs --target main-branch" | |
uses: "./.github/actions/devcontainer/run" | |
with: | |
runCmd: "./scripts/bin/infra publish mkdocs --target main-branch" | |
env: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- name: "infra publish mkdocs --target latest-release" | |
if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}" | |
uses: "./.github/actions/devcontainer/run" | |
with: | |
runCmd: "./scripts/bin/infra publish mkdocs --target latest-release" | |
env: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- name: "infra publish npm" | |
if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}" | |
uses: "./.github/actions/devcontainer/run" | |
with: | |
runCmd: "./scripts/bin/infra publish npm" | |
env: | | |
NPM_TOKEN=${{ secrets.NPM_TOKEN }} | |
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync) | |
# | |
# - name: "infra publish cargo" | |
# if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}" | |
# uses: "./.github/actions/devcontainer/run" | |
# with: | |
# runCmd: "./scripts/bin/infra publish cargo" | |
# env: | | |
# CARGO_REGISTRY_TOKEN=${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- name: "infra publish github-release" | |
if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}" | |
uses: "./.github/actions/devcontainer/run" | |
with: | |
runCmd: "./scripts/bin/infra publish github-release" | |
env: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} |