chore: add GitHub action to make a release with .xdc file

This commit is contained in:
WofWca 2023-03-26 16:11:56 +04:00
parent 7fe9432a83
commit ccf92e3844

View File

@ -23,8 +23,7 @@ concurrency:
cancel-in-progress: false
jobs:
# Build job
build:
prepare-for-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -39,10 +38,33 @@ jobs:
with:
node-version: "16"
cache: "pnpm"
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: pnpm install
build-webxdc:
runs-on: ubuntu-latest
needs: prepare-for-build
steps:
- name: Build
run: pnpm run build-webxdc
- name: Release
uses: softprops/action-gh-release@v1
with:
# prerelease: ${{ contains(github.event.ref, '-beta') }}
prerelease: true
fail_on_unmatched_files: true
files: dist/*.xdc
# Deploy to GitHub Pages.
deploy-gh-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: prepare-for-build
steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build
env:
REPO_OWNER_AND_NAME: ${{ github.repository }}
@ -53,15 +75,6 @@ jobs:
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1