Skip to content

Commit

Permalink
faking master HERE
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Nov 24, 2023
1 parent 18a69aa commit 18aab9d
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 187 deletions.
22 changes: 0 additions & 22 deletions .github/actions/docs/build-status/action.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/actions/docs/build-status/script.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ jobs:
- name: Run noir_js
run: |
yarn workspace @noir-lang/noir_js build
- name: Remove pre-releases
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn setStable
- name: Build docs
run:
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/docs-release.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,29 +1,67 @@
name: Cut a new version of the docs
name: TEST - Release

on:
workflow_dispatch:
inputs:
tag:
description: The tag to build Docs for
required: false
push:
branches:
- zpedro/docs_workflow

jobs:
publish-docs:
test-release-please:
name: Create Release
outputs:
release-pr: ${{ steps.release.outputs.pr }}
tag-name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
if: ${{ inputs.tag != '' }}
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout sources
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.NOIR_RELEASES_TOKEN }}
command: manifest

test-update-lockfile:
name: Update lockfile
needs: [test-release-please]
if: ${{ needs.release-please.outputs.release-pr }}
runs-on: ubuntu-latest
steps:
- name: Checkout release branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
ref: ${{ fromJSON(needs.release-please.outputs.release-pr).headBranchName }}
token: ${{ secrets.NOIR_RELEASES_TOKEN }}

- name: Setup toolchain
uses: dtolnay/[email protected]

- name: Create new branch
- name: Update lockfile
run: |
git checkout -b new-docs-version-${{ github.event.inputs.tag }}
cargo update --workspace
- name: Configure git
run: |
git config user.name kevaundray
git config user.email [email protected]
- name: Commit updates
run: |
git add Cargo.lock
git commit -m 'chore: Update lockfile'
git push
test-publish-docs:
name: Publish docs
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Checkout release branch
uses: actions/checkout@v4
with:
ref: ${{ fromJSON(needs.release-please.outputs.release-pr).headBranchName }}
token: ${{ secrets.NOIR_RELEASES_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v2
with:
Expand Down Expand Up @@ -60,53 +98,31 @@ jobs:
run: |
yarn workspace @noir-lang/noir_js build
- name: Build docs
run:
yarn workspace docs build

- name: Cut a new version
working-directory: ./docs
run: yarn docusaurus docs:version ${{ inputs.tag }}

- name: Remove pre-releases
id: get_version
run: |
cd docs && yarn setStable
- name: Commit new documentation version
run: |
git config --local user.name 'signorecello'
git config --local user.email '[email protected]'
git add .
git commit -m "chore(docs): cut new docs version for tag ${{ github.event.inputs.tag }}"
- name: Push changes to new branch
run: git push origin new-docs-version-${{ github.event.inputs.tag }}

- name: Create Pull Request
run: |
gh pr create \
--title "chore(docs): docs for ${{ github.event.inputs.tag }}" \
--body "Updates documentation to new version for tag ${{ github.event.inputs.tag }}." \
--base master \
--head new-docs-version-${{ github.event.inputs.tag }} \
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build docs
git push
- name: Build docs for deploying
run: yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/build'
production-branch: master
production-deploy: true
# production-branch: master
# production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for tag ${{ inputs.tag }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ jobs:
git commit -m 'chore: Update lockfile'
git push
publish-docs:
name: Publish docs
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Dispatch to publish workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: docs-new-version.yml
repo: noir-lang/noir
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{ "tag": "${{ needs.release-please.outputs.tag-name }}"}'


build-binaries:
name: Build binaries
needs: [release-please]
Expand Down Expand Up @@ -78,19 +94,3 @@ jobs:
ref: master
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}", "npm-tag": "latest" }'


publish-docs:
name: Publish docs
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Dispatch to publish workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: docs-new-version.yml
repo: noir-lang/noir
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{ "tag": "${{ needs.release-please.outputs.tag-name }}"}'

0 comments on commit 18aab9d

Please sign in to comment.