add support for Solidity 0.8.27
(#1096)
#8
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@692973e3d937129bcbf40652eb9f2f61becf3332" | |
- 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@3de3850952bec538fde60aac71731376e57b9b57" | |
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 }} | |
- 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 }} |