update docs publish #20
Workflow file for this run
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: "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 | ||
steps: | ||
- name: Setup actions | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- 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 | ||
- 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" | ||
Check failure on line 36 in .github/workflows/publish.yaml GitHub Actions / Publish package and docsInvalid workflow file
|
||
run: echo "Publish!" |