Skip to content

update release (#91) #98

update release (#91)

update release (#91) #98

Workflow file for this run

name: "Publish package and docs"
on: [push]
env:
AURI_GITHUB_TOKEN: ${{secrets.AURI_GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
outputs:
changesets: ${{steps.check-changesets.outputs.changesets}}
steps:
- name: Setup actions
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"
cache: "npm"
- name: Install dependencies
run: npm i && npm run build
- name: Prepare release
run: npm run auri prepare ${{ github.ref_name }}
- name: Publish package
run: npm run auri publish ${{ github.ref_name }}
- name: Check if ".changesets" directory has files
id: check-changesets
run: |
if [ -z "$(ls -A .changesets)" ]; then
echo "changesets=0" >> "$GITHUB_OUTPUT"
else
echo "changesets=1" >> "$GITHUB_OUTPUT"
fi
- name: Publish docs
if: steps.check-changesets.outputs.changesets == 0 && github.ref_name == 'main'
run: echo "Publish!"