Skip to content

v1.0.62

v1.0.62 #61

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
release:
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: Generate sha256 of decoders.db
run: cd data && sha256sum decoders.db > ../decoders.db.sha256
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
data/decoders.db
decoders.db.sha256
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" -o -iname "*.webp" -o -iname "*.ico" -o -iname "*.jpeg" -o -iname "*.jpg" \) ! -path "./.git/*" -exec rm -f {} +
- name: Create robots.txt to deny all
run: |
echo "User-agent: *" > robots.txt
echo "Disallow: /" >> robots.txt
- run: |
touch .nojekyll
echo "decoders.assets.tago.io" > CNAME
- 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 --force