chore(release): 1.9.6 #35
Workflow file for this run
This file contains hidden or 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 Workflow | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build release archives | |
| run: npm run release:build | |
| # Publish to DockerHub | |
| - name: Docker Login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Docker Setup Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker Build & Push (multi-arch) | |
| run: npm run docker:buildx | |
| # Publish to NPM (OIDC / Trusted Publishing) | |
| - name: Setup Node for npmjs | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Publish to npmjs.org | |
| working-directory: release/sync-in-server | |
| run: npm publish | |
| - name: Extract changelog for current version | |
| id: changelog | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| awk -v ver="$VERSION" ' | |
| $0 ~ "^## \\[" ver "\\]" { capture=1; next } | |
| capture && /^## / { exit } | |
| capture { print } | |
| ' CHANGELOG.md > latest-changelog.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body_path: latest-changelog.md | |
| files: | | |
| release/*.zip | |
| release/*.tar.gz | |
| - name: Clean build | |
| run: npm run release:clean |