Skip to content

Service worker using rescript and Cache fixed #82

Service worker using rescript and Cache fixed

Service worker using rescript and Cache fixed #82

Workflow file for this run

name: Auto Release
on:
push:
branches: [master, test]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/hydrogen"
- name: Install dependencies
working-directory: ./sensum-pwa
run: yarn install
- name: Compile Rescript code
working-directory: ./sensum-pwa
run: yarn re:build
- name: Build project
working-directory: ./sensum-pwa
run: yarn build
- name: Archive sensum build artifact
uses: actions/upload-artifact@v4
with:
name: sensum-artifact
path: ./sensum-pwa/dist/
- name: Serve as a Github page
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
folder: ./sensum-pwa/dist
branch: main
repository-name: emeks-studio/dsensum
token: ${{ secrets.DEPLOY_PAT }}
git-config-name: mk-emeks
git-config-email: mirko@emeks.com.ar
deploy:
runs-on: ubuntu-latest
needs: [release]
if: github.ref == 'refs/heads/master'
steps:
- name: Download sensum build artifact
uses: actions/download-artifact@v4
with:
name: sensum-artifact
path: ./sensum-pwa/dist
- name: Create tar archive
working-directory: ./sensum-pwa
run: tar cf dsensum-pwa.tar dist
- name: Create Release
id: create_release
uses: CupOfTea696/gh-action-auto-release@v1.0.2
with:
title: "d-sensum: $version"
tag: "dsensum-v$semver"
draft: false
regex: "/^dsensum-v#{semver}$/i"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload tar archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sensum-pwa/dsensum-pwa.tar
asset_name: dsensum-pwa.tar
asset_content_type: application/x-tar