Bump 2.1.0 #22
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: Release | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'version.ts' | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup Deno | |
uses: denoland/[email protected] | |
with: | |
deno-version: v1.x | |
- name: Check formatting | |
run: deno fmt --check | |
- name: Run linter | |
run: deno lint | |
- name: Run tests | |
env: | |
SERPAPI_TEST_KEY: ${{ secrets.SERPAPI_TEST_KEY }} | |
run: deno task test:ci | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Build npm files | |
run: deno task npm | |
- name: Push tag | |
run: | | |
VERSION=$(cat version.ts | sed -n 's/.*"\(.*\)".*/\1/p') | |
echo $VERSION | |
git tag $VERSION | |
git push origin $VERSION | |
- name: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: cd npm && npm publish |