Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/master-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build and publish tarball

on:
push:
branches:
- master
workflow_dispatch:

jobs:
tarball:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5

- uses: oven-sh/setup-bun@v2

- run: bun install

- run: bun test

- run: bun run typecheck

- run: bun run build

- name: Pack tarball
run: npm pack

- name: Rename tarball to fixed name
run: mv *.tgz opencode-kiro-auth.tgz

- name: Check if release exists
id: check_release
run: |
if gh release view "_master" >/dev/null 2>&1; then
echo "release_exists=true" >> $GITHUB_ENV
else
echo "release_exists=false" >> $GITHUB_ENV
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release if missing
if: env.release_exists != 'true'
run: |
gh release create "_master" \
--target master \
--prerelease \
--title "Nightly Build master" \
--notes "Nightly build. Commit: ${{ github.sha }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure _master tag points at HEAD
run: |
git tag -f _master HEAD
git push origin _master --force
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Delete old tarball asset
run: gh release delete-asset _master opencode-kiro-auth.tgz --yes || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload tarball
run: gh release upload _master opencode-kiro-auth.tgz --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: oven-sh/setup-bun@v2

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist/
*.tsbuildinfo
.vscode/*
.sisyphus
*.tgz