Skip to content

v1.0.11

v1.0.11 #10

Workflow file for this run

name: Generate and Release Decoders
on:
release:
types: [published]
permissions:
contents: write
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
linter:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run linter
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
validator:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Run validator
run: npm start validator
generate:
runs-on: ubuntu-latest
needs: [setup, linter, test, validator]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Generate decoders.db
run: npm start generate
- name: Upload decoders.db artifact
uses: actions/upload-artifact@v4
with:
name: decoders-db
path: data/decoders.db
release:
runs-on: ubuntu-latest
needs: generate
steps:
- name: Download decoders.db artifact
uses: actions/download-artifact@v4
with:
name: decoders-db
path: ./data
- name: Upload decoders.db to GitHub release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./data/decoders.db
asset_name: decoders.db
asset_content_type: application/octet-stream
assets:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git branch -D gh-pages || true
- run: git checkout --orphan gh-pages
- run: find . -mindepth 1 -maxdepth 1 ! -name 'decoders' ! -name '.git' -exec rm -rf {} +
- run: find . -type f ! \( -iname "*.png" -o -iname "*.svg" \) -exec rm -f {} +
- run: |
git config --global user.email "[email protected]"
git config --global user.name "TagoIO"
git add -A
git commit -m "decoders assets"
git push origin gh-pages