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: Publish Svelte App on Release | |
on: | |
release: | |
types: [prereleased, published] | |
env: | |
BUILD_NAME: Sensor_Viewer | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.6.2' # You can change the Node.js version as needed | |
cache: npm | |
- run: npm ci | |
- run: npm run build | |
- name: Zip Docs and Build | |
run: | | |
sudo zip -r ${{env.BUILD_NAME}}.zip ./build/* | |
- name: Upload to Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{env.BUILD_NAME}}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |