snapshot.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: snapshot
  2. on:
  3. push:
  4. branches:
  5. - dev
  6. - opentui
  7. concurrency: ${{ github.workflow }}-${{ github.ref }}
  8. jobs:
  9. publish:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v3
  13. with:
  14. fetch-depth: 0
  15. - run: git fetch --force --tags
  16. - uses: actions/setup-go@v5
  17. with:
  18. go-version: ">=1.24.0"
  19. cache: true
  20. cache-dependency-path: go.sum
  21. - uses: oven-sh/setup-bun@v2
  22. with:
  23. bun-version: 1.2.21
  24. - name: Cache ~/.bun
  25. id: cache-bun
  26. uses: actions/cache@v3
  27. with:
  28. path: ~/.bun
  29. key: ${{ runner.os }}-bun-1-2-21-${{ hashFiles('bun.lock') }}
  30. restore-keys: |
  31. ${{ runner.os }}-bun-1-2-21-
  32. - name: Install dependencies
  33. run: bun install
  34. - name: Publish
  35. run: |
  36. ./packages/opencode/script/publish.ts
  37. env:
  38. OPENCODE_SNAPSHOT: true
  39. OPENCODE_TAG: ${{ github.ref_name }}
  40. GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
  41. NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}