v2.1.0 #101
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
## This workflow has been disabled for now, because the CKAN API is blocking our requests. | |
## Re-enable when we can package test data inside this repository. | |
name: "PR check for the main branch" | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
lint_and_build: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
# Set up concurrency so the SQLite cache can be reused between nodejs matrix versions | |
# concurrency: | |
# group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
name: Setup npm cache | |
id: node_modules | |
with: | |
path: node_modules/ | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-${{ hashFiles('**/package.json') }} | |
- name: Install dependencies | |
if: steps.node_modules.outputs.cache-hit != 'true' | |
run: | | |
npm install --global yarn | |
yarn install | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
id: build_cache | |
with: | |
path: node_modules/ | |
key: ${{ runner.os }}-src-${{ hashFiles('src/**/*.ts') }} | |
restore-keys: | | |
${{ runner.os }}-src-${{ hashFiles('src/**/*.ts') }} | |
- name: Build | |
if: steps.build_cache.outputs.cache-hit != 'true' | |
run: | | |
npm run build | |
#- name: git setup | |
# run: | | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "github actions" | |
- name: create changelog.md | |
if: steps.build_cache.outputs.cache-hit != 'true' | |
id: prepare | |
run: | | |
bash ./.github/workflows/generate_changelog.sh | |
# git add . | |
# git commit -m "create changelog.md" | |
version=$(cat package.json | jq -r '.version') | |
echo "version=$version" >> $GITHUB_OUTPUT | |
tgz=$(npm pack | tail -n1 | tr -d '\n') | |
echo "tgz=$tgz" >> $GITHUB_OUTPUT | |
- name: github draft release (trigger / workflow_dispatch) | |
if: steps.build_cache.outputs.cache-hit != 'true' | |
run: | | |
# gh release create ${{ steps.prepare.outputs.version }} ${{ steps.prepare.outputs.tgz }} --notes-file change_notes/${{ steps.prepare.outputs.version }}.md | |
npm publish . --dry-run | |
env: | |
GH_TOKEN: ${{ secrets.G_ACTIONS_TOKEN_FOR_PR }} | |
GITHUB_TOKEN: ${{ secrets.G_ACTIONS_TOKEN_FOR_PR }} |