|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + paths: |
| 7 | + - 'src/**' |
| 8 | + - 'package.json' |
| 9 | + - 'build.ts' |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: write |
| 13 | + id-token: write |
| 14 | + |
| 15 | +jobs: |
| 16 | + build-and-release: |
| 17 | + name: Build and Release |
| 18 | + runs-on: ubuntu-latest |
| 19 | + timeout-minutes: 15 |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + fetch-depth: 0 |
| 24 | + |
| 25 | + - name: Setup Bun |
| 26 | + uses: oven-sh/setup-bun@v1 |
| 27 | + with: |
| 28 | + bun-version: latest |
| 29 | + |
| 30 | + - name: Install dependencies |
| 31 | + run: bun install --frozen-lockfile |
| 32 | + |
| 33 | + - name: Build all platforms |
| 34 | + run: bun run build |
| 35 | + |
| 36 | + - name: Get version from package.json |
| 37 | + id: package-version |
| 38 | + run: echo "version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT |
| 39 | + |
| 40 | + - name: Create GitHub Release |
| 41 | + uses: softprops/action-gh-release@v1 |
| 42 | + with: |
| 43 | + tag_name: v${{ steps.package-version.outputs.version }} |
| 44 | + name: Effect DevTools TUI v${{ steps.package-version.outputs.version }} |
| 45 | + body: | |
| 46 | + ## Effect DevTools Terminal UI |
| 47 | + |
| 48 | + Download the binary for your platform below. |
| 49 | + |
| 50 | + ### Installation via npm |
| 51 | + ```bash |
| 52 | + npm install -g @danielfgray/effect-devtui |
| 53 | + effect-devtools |
| 54 | + ``` |
| 55 | + |
| 56 | + ### Direct Binary Download |
| 57 | + ```bash |
| 58 | + # Linux x64 |
| 59 | + wget https://github.com/${{ github.repository }}/releases/download/v${{ steps.package-version.outputs.version }}/effect-devtools-linux-x64 |
| 60 | + chmod +x effect-devtools-linux-x64 |
| 61 | + ./effect-devtools-linux-x64 |
| 62 | + |
| 63 | + # macOS (Apple Silicon) |
| 64 | + wget https://github.com/${{ github.repository }}/releases/download/v${{ steps.package-version.outputs.version }}/effect-devtools-darwin-arm64 |
| 65 | + chmod +x effect-devtools-darwin-arm64 |
| 66 | + ./effect-devtools-darwin-arm64 |
| 67 | + ``` |
| 68 | + |
| 69 | + Built from commit ${{ github.sha }} |
| 70 | + files: | |
| 71 | + dist/effect-devtools-linux-x64/effect-devtools-linux-x64 |
| 72 | + dist/effect-devtools-linux-arm64/effect-devtools-linux-arm64 |
| 73 | + dist/effect-devtools-linux-x64-musl/effect-devtools-linux-x64-musl |
| 74 | + dist/effect-devtools-linux-arm64-musl/effect-devtools-linux-arm64-musl |
| 75 | + dist/effect-devtools-darwin-x64/effect-devtools-darwin-x64 |
| 76 | + dist/effect-devtools-darwin-arm64/effect-devtools-darwin-arm64 |
| 77 | + dist/effect-devtools-windows-x64/effect-devtools-windows-x64.exe |
| 78 | + draft: false |
| 79 | + prerelease: false |
| 80 | + env: |
| 81 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 82 | + |
| 83 | + - name: Setup Node for npm publishing |
| 84 | + uses: actions/setup-node@v4 |
| 85 | + with: |
| 86 | + node-version: '20' |
| 87 | + registry-url: 'https://registry.npmjs.org' |
| 88 | + |
| 89 | + - name: Publish to npm |
| 90 | + run: npm publish --access public |
| 91 | + env: |
| 92 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments