chore: bump JS dependencies #76
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: Sources | |
on: | |
push: | |
branches: [master, develop] | |
paths: | |
- '.github/workflows/sources.yml' | |
- 'scripts/generate-sources-metadata.js' | |
- 'scripts/package-sources.sh' | |
- 'src/sites/**/model.ts' | |
jobs: | |
sources: | |
name: Sources | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Install sites dependencies | |
working-directory: src/sites | |
run: npm ci | |
- name: Build sites | |
working-directory: src/sites | |
run: npm run build | |
- name: Generate sources metadata | |
run: node scripts/generate-sources-metadata.js ${{ github.ref_name }} | tee metadata.json | |
- name: Package sources | |
run: ./scripts/package-sources.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sources | |
path: | | |
metadata.json | |
sources_packages/*.zip | |
if-no-files-found: error | |
upload: | |
name: Upload to GitHub releases | |
runs-on: ubuntu-latest | |
needs: sources | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: sources | |
- name: Get date for body | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %Z')" | |
- name: Upload result | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: sources-${{ github.ref_name }} | |
name: Sources (${{ github.ref_name }}) | |
allowUpdates: true | |
draft: false | |
prerelease: true | |
artifacts: metadata.json,sources_packages/*.zip | |
body: | | |
Automatically uploaded by GitHub actions. | |
**Head:** ${{ github.sha }} | |
**Date:** ${{ steps.date.outputs.date }} | |
- uses: geekyeggo/delete-artifact@v1 | |
with: | |
failOnError: false | |
name: sources |