From 24c08a698bf43d47bd576e983f4cd54bef9de63f Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 4 Nov 2022 16:21:54 -0700 Subject: [PATCH] Move to Pages action --- .github/release-drafter.yml | 9 ------- .github/workflows/pages.yml | 24 +++++++++++++++---- .github/workflows/publish.yml | 45 ----------------------------------- index.html | 2 +- 4 files changed, 21 insertions(+), 59 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/publish.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 29ce27a..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,9 +0,0 @@ -categories: - - title: "⬆️ Dependencies" - collapse-after: 1 - labels: - - "dependencies" -template: | - ## What's Changed - - $CHANGES diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 5828616..0566fef 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -21,21 +21,37 @@ concurrency: cancel-in-progress: true jobs: - # Single deploy job since we're just deploying deploy: + name: Build from Source and Deploy environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + - name: install node v16 + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install Yarn with NPM + run: npm install -g yarn + - name: yarn install + run: yarn install + - name: Compile TypeScript + run: | + set -e + rm -rf dist + NODE_ENV=production npm exec -- tsc + NODE_ENV=production npm exec -- rollup -c + - name: Rename build artifact + run: | + mkdir js/modules + mv dist/web/index.js js/modules/esptool.js - name: Setup Pages uses: actions/configure-pages@v2 - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - # Upload entire repository path: '.' - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 091d894..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,45 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: TypeScript Compile Package - -on: - release: - types: [published] - -jobs: - tsc: - name: Build from Source - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v16 - uses: actions/setup-node@v1 - with: - node-version: 16 - - name: Install Yarn with NPM - run: npm install -g yarn - - name: yarn install - run: yarn install - - name: Compile TypeScript - run: | - set -e - rm -rf dist - NODE_ENV=production npm exec -- tsc - NODE_ENV=production npm exec -- rollup -c - - name: Rename build artifact - run: mv dist/web/index.js esptool.js - - name: Upload Assets to the GitHub Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: esptool.js - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: esptool.js - asset_name: esp_tool.js - tag: ${{ github.ref }} - overwrite: true - body: "This is my release text" \ No newline at end of file diff --git a/index.html b/index.html index a323e24..399bb72 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@ window.location.hostname === "localhost" ? "/dist/web/index.js" : "https://unpkg.com/esp-web-flasher@5.1.4/dist/web/index.js?module" - //"https://cdn.jsdelivr.net/gh/adafruit/Adafruit_WebSerial_ESPTool@5.2.0/diest/web/index.js" + //"https://cdn.jsdelivr.net/gh/adafruit/Adafruit_WebSerial_ESPTool@5.2.0/dist/web/index.js" );