Skip to content

ci: autopublish workflows #15

ci: autopublish workflows

ci: autopublish workflows #15

Workflow file for this run

name: Push
on: push
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 24
cache: "npm"
- name: Install deps
run: npm ci
- name: Lint
run: npm run lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 24
cache: "npm"
- name: Install deps
run: npm ci
- name: Run unit tests
run: npm run test
create-tag-if-needed:
name: Create version tag on new version
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create tag if needed
shell: bash
run: |
VERSION=`jq -r '.version' package.json`
if [[ "$VERSION" == "0.0.0" ]];
then
# fake version, quit
exit 0
fi
if ! git fetch origin "$VERSION"
then
git tag "v$VERSION"
git push origin "v$VERSION"
fi