Skip to content

vueless-release

vueless-release #6

Workflow file for this run

name: Release (triggered from Vueless repo)
on:
repository_dispatch:
types: [vueless-release]
permissions: write-all
jobs:
auto-release:
name: "Auto-Release: ${{ github.event.client_payload.release_type }}"
if: github.ref_name == 'main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm install vueless@latest
- run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add package.json package-lock.json
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "feat: update Vueless UI to the latest version"
git push origin ${{ github.ref_name }}
fi
- run: npm run prepack
- run: npm run release:${{ github.event.client_payload.release_type }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-beta:
name: 'Update Beta'
needs: auto-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
git fetch origin beta
git checkout beta
git merge origin/main --no-edit -m "Merge main into beta [skip ci]" || echo "Merge conflict, needs manual resolution"
git push origin beta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}