Skip to content

Add a security policy, a citation file, and a CI badge #24

Add a security policy, a citation file, and a CI badge

Add a security policy, a citation file, and a CI badge #24

Workflow file for this run

name: Publish Package
on:
push:
tags:
- 'v*'
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@latest
- run: npm --version
- run: npm ci
- run: npm run build --if-present
- run: npm test --if-present
- run: npm publish --access public
bump-homebrew:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Wait for tarball availability
run: |
for i in $(seq 1 10); do
STATUS=$(curl -sI "https://github.com/aloth/olcli/archive/refs/tags/${{ github.ref_name }}.tar.gz" -o /dev/null -w '%{http_code}')
if [ "$STATUS" = "200" ] || [ "$STATUS" = "302" ]; then
echo "Tarball ready (HTTP $STATUS)"
exit 0
fi
echo "Attempt $i: HTTP $STATUS, waiting 5s..."
sleep 5
done
echo "Tarball not available after 50s"
exit 1
- name: Bump Homebrew formula
uses: mislav/bump-homebrew-formula-action@v4.2
with:
formula-name: olcli
homebrew-tap: aloth/homebrew-tap
tag-name: ${{ github.ref_name }}
download-url: https://github.com/aloth/olcli/archive/refs/tags/${{ github.ref_name }}.tar.gz
create-pullrequest: false
commit-message: |
olcli: bump to {{version}}
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}