chore: update docs (#317) #48
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: redis-release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- redis/** | |
- "!redis/package-lock.json" | |
jobs: | |
build-redis: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: redis | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org | |
- name: Install winglang | |
run: npm i -g winglang | |
- name: Install dependencies | |
run: npm install --include=dev | |
working-directory: redis | |
- name: Test | |
run: wing test | |
working-directory: redis | |
- name: Generate docs | |
run: wing docs | |
working-directory: redis | |
- name: Pack | |
run: wing pack | |
working-directory: redis | |
- name: Check for missing changes | |
run: git diff --exit-code || (echo 'Please run "npm install", "wing test", and | |
"wing gen-docs" from ./redis, and commit any changes to your branch.' | |
&& exit 1) | |
- name: Get package version | |
run: echo WINGLIB_VERSION=$(node -p "require('./package.json').version") >> | |
"$GITHUB_ENV" | |
working-directory: redis | |
- name: Publish | |
run: npm publish --access=public --registry https://registry.npmjs.org --tag | |
latest *.tgz | |
working-directory: redis | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Tag commit | |
uses: tvdias/github-tagger@v0.0.1 | |
with: | |
repo-token: ${{ secrets.PROJEN_GITHUB_TOKEN }} | |
tag: redis-v${{ env.WINGLIB_VERSION }} | |
- name: GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: redis v${{ env.WINGLIB_VERSION }} | |
tag_name: redis-v${{ env.WINGLIB_VERSION }} | |
files: "*.tgz" | |
token: ${{ secrets.PROJEN_GITHUB_TOKEN }} |