fix desktop not updating inner html/js #36
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: Version Bump | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "README.md" | |
| - "LICENSE" | |
| - "*.md" | |
| - "docs/**" | |
| - "promo.jpg" | |
| - "screenshot.png" | |
| workflow_dispatch: | |
| jobs: | |
| bump: | |
| name: Bump patch version and tag release | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Bump patch version | |
| id: version | |
| run: | | |
| package_name="$(node -p "require('./package.json').name")" | |
| desktop_package_name="$(node -p "require('./desktop/package.json').name")" | |
| version="$(node - <<'NODE' | |
| const pkg = require("./package.json"); | |
| const parts = pkg.version.split(".").map(Number); | |
| parts[2] += 1; | |
| console.log(parts.join(".")); | |
| NODE | |
| )" | |
| while git rev-parse -q --verify "refs/tags/v${version}" >/dev/null || \ | |
| git ls-remote --exit-code origin "refs/tags/v${version}" >/dev/null 2>&1 || \ | |
| npm view "${package_name}@${version}" version --silent >/dev/null 2>&1 || \ | |
| npm view "${desktop_package_name}@${version}" version --silent >/dev/null 2>&1; do | |
| version="$(node -e "const p='${version}'.split('.').map(Number); p[2] += 1; console.log(p.join('.'))")" | |
| done | |
| npm version "${version}" --no-git-tag-version | |
| VERSION="${version}" node - <<'NODE' | |
| const fs = require("node:fs"); | |
| const packagePath = "desktop/package.json"; | |
| const pkg = JSON.parse(fs.readFileSync(packagePath, "utf8")); | |
| pkg.version = process.env.VERSION; | |
| pkg.dependencies.kanbanqube = process.env.VERSION; | |
| fs.writeFileSync(packagePath, `${JSON.stringify(pkg, null, 2)}\n`); | |
| NODE | |
| ruby -0pi -e "gsub(/version \"[^\"]+\"/, 'version \"' + '${version}' + '\"')" Formula/kanbanqube.rb | |
| ruby -0pi -e "gsub(/version \"[^\"]+\"/, 'version \"' + '${version}' + '\"')" Casks/kanbanqube-desktop.rb | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| - name: Commit version bump and tag | |
| run: | | |
| version="${{ steps.version.outputs.version }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add package.json package-lock.json desktop/package.json Formula/kanbanqube.rb Casks/kanbanqube-desktop.rb | |
| git commit -m "chore: bump version to ${version}" | |
| git tag "v${version}" | |
| git push --atomic origin HEAD:main "v${version}" | |
| - name: Start release workflow | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh workflow run release.yml --ref main -f tag=v${{ steps.version.outputs.version }} |