From 384a6fad293b6a652f1b7bbceb4e2b392a709930 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:57:33 -0700 Subject: [PATCH] ci: bring back deploy workflow --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ TODO.md | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..75f6b177d3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: build-scratch-blocks +on: + push: # Runs whenever a commit is pushed to the repository + workflow_dispatch: # Allows you to run this workflow manually from the Actions tab +jobs: + setup: + runs-on: ubuntu-latest + env: + PROJECT_PATH: ./scratch-blocks + steps: + - run: | + for F in chrome chromium chromedriver; do + which $F && $F --version || echo Not found: $F + done + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 + - name: Check Python version + run: python --version + - name: Setup Node + uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3 + with: + node-version-file: '.nvmrc' + # TODO: tests + - name: Install Node Dependencies + run: npm ci + - name: Build + run: npm run build + # - name: Deploy playground to GitHub Pages + # uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./gh-pages + # full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}" + # enable_jekyll: true + - name: Run semantic-release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx --no -- semantic-release diff --git a/TODO.md b/TODO.md index 6c0a21d57f..0e190ba3e7 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ Before this un-forked version of `scratch-blocks` is fully ready for release, we - [ ] Hook up i18n / l10n - [x] Fix or remove Husky -- [ ] Set up CI & CD +- [x] Set up CI & CD - [ ] Wait for Blockly v12 release, then update Blockly dependencies accordingly Things we need to do before we consider this project "done" but could wait until after the initial release: