Skip to content

chore: weekly CRED-1 update 2026-07-07 #8

chore: weekly CRED-1 update 2026-07-07

chore: weekly CRED-1 update 2026-07-07 #8

Workflow file for this run

name: Publish Package
on:
push:
tags:
- 'v*'
permissions:
id-token: write
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@latest
# Derive npm-compatible CalVer from Git tag: v2026-06-13 -> 2026.6.13
- name: Set version from tag
id: version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
VERSION=$(echo "$TAG" | awk -F- '{printf "%s.%d.%d", $1, int($2), int($3)}')
npm version "$VERSION" --no-git-tag-version --allow-same-version
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Publishing version: $VERSION"
- run: npm ci
- run: npm run build --if-present
- name: Publish to npm
run: npm publish --access public --provenance
# Commit version bump back to main so package.json stays in sync
- name: Commit version back
run: |
git config user.name "Alexander Loth"
git config user.email "aloth@users.noreply.github.com"
git add package.json
git diff --cached --quiet && exit 0
git commit -m "chore: bump version to ${{ steps.version.outputs.version }} [skip ci]"
git push origin HEAD:main
bump-homebrew:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Bump Homebrew formula
uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: cred1
homebrew-tap: aloth/homebrew-tap
tag-name: ${{ github.ref_name }}
download-url: https://github.com/aloth/cred-1/archive/refs/tags/${{ github.ref_name }}.tar.gz
create-pullrequest: false
commit-message: |
cred1: bump to {{version}}
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}