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: 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 run 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@v3 | |
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@v3 | |
with: | |
name: decoders-db | |
path: data/decoders.db | |
- 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 |