EddyTheCo pull_request to main #85
Workflow file for this run
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: build-wasm | |
run-name: ${{ github.actor }} ${{ github.event_name }} to ${{ github.base_ref }} | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [main,develop] | |
jobs: | |
build-wasm: | |
uses: EddyTheCo/Common/.github/workflows/[email protected] | |
with: | |
qtModules: 'qtwebsockets qtshadertools' | |
qtVersion: '6.6.0' | |
emsdkVersion: '3.1.37' | |
deploy_dev: ${{ (startsWith(github.base_ref, 'main'))&&(startsWith(github.head_ref, 'develop')) }} | |
release-deploy: | |
if: ${{ ((startsWith(github.base_ref, 'main'))&&(startsWith(github.head_ref, 'develop')))||(startsWith(github.ref, 'refs/tags/v')) }} | |
needs: [build-wasm] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Move repositories to webpage | |
run: | | |
mkdir artifacts/WASM | |
cmake -E tar c artifacts/WASM/webapp.tar -- artifacts/wasm/ | |
mv artifacts/wasm github-pages | |
- name: Package github-page | |
working-directory: ${{ github.workspace }}/github-pages/ | |
run: | | |
cmake -E make_directory ${{runner.temp}}/page-packages | |
cmake -E tar c ${{runner.temp}}/page-packages/github-pages.tar -- . | |
- name: Releases | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./artifacts/*/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: 'github-pages' | |
path: ${{runner.temp}}/page-packages/* | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |