remove debug guards for com hub debugging functions #64
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| name: Release | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Extract version from Cargo.toml | |
| id: get_version | |
| run: | | |
| VERSION=$(grep -E '^version\s*=\s*".*"' ./rs-lib/Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/') | |
| echo "Version found: $VERSION" | |
| echo "version=$VERSION" >> $GITHUB_ENV | |
| - name: Build | |
| run: | | |
| deno task release | |
| - name: Generate datex.js bundle for pages (without inline WASM) | |
| run: | | |
| deno task build-bundle | |
| - name: Set up GitHub Pages directory with datex.js and WASM | |
| run: | | |
| mkdir -p ./pages | |
| cp ./datex.js ./pages/datex.js | |
| cp ./src/datex-web/datex_web.wasm ./pages/datex_web.wasm | |
| - name: Generate datex.js bundle for release artifact (with inline WASM) | |
| run: | | |
| deno task build-bundle --inline-wasm | |
| - name: Create Tag | |
| id: create_tag | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git tag "v${{ env.version }}" | |
| git push origin "v${{ env.version }}" | |
| - name: Create Draft Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| tag_name: "v${{ env.version }}" | |
| files: ./datex.js | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./pages | |
| retention-days: 3 | |
| deploy: | |
| needs: release | |
| name: Deploy JS to GitHub Pages | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - id: deploy | |
| uses: actions/deploy-pages@v4 |