Skip to content

Commit

Permalink
Try to fix src tarball construction
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 5, 2023
1 parent 8337ffd commit 58d1dca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ concurrency:
group: distribute
cancel-in-progress: true

env:
VERBOSE: 1

jobs:
check:
permissions:
Expand Down Expand Up @@ -60,7 +57,7 @@ jobs:
# and we want people to be able to just grab the single binaries as
# they wish
compile:
needs: [ci]
needs: [ci, check]
permissions:
contents: read
actions: write
Expand All @@ -82,13 +79,10 @@ jobs:

- uses: teaxyz/setup@v0
id: tea
with:
# because linux self-hosted image doesn’t have git
srcroot: ${{ github.workspace }}

- run: sed -i.bak "s/^const version = .*$/const version = \"${{ steps.tea.outputs.version }}\"/" src/app.ts
- run: tea deno task compile
- run: ./tea --version # verify compilation works
- run: echo "export default function() { return '${{ needs.check.outputs.version }}' }" > src/hooks/useVersion.ts
- run: deno task compile
- run: test "$(./tea --version)" = "tea ${{ needs.check.outputs.version }}"
- run: tar cJf tea-${{ steps.tea.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz ./tea
- uses: actions/upload-artifact@v3
with:
Expand All @@ -104,23 +98,19 @@ jobs:

bundle-src:
runs-on: ubuntu-latest
needs: [ci]
needs: [ci, check]
env:
FILENAME: tea-${{ needs.check.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
path: tea
- uses: teaxyz/setup@v0
id: tea
with:
srcroot: tea
- run: echo "export default function() { return '${{ steps.tea.outputs.version }}' }" > src/hooks/useVersion.ts
working-directory: tea
- run: mv tea tea-${{ steps.tea.outputs.version }}
- run: tar cJf tea-${{ steps.tea.outputs.version }}.tar.xz ./tea-${{ steps.tea.outputs.version }}
path: ${{ env.FILENAME }}
- run: echo "export default function() { return '${{ needs.check.outputs.version }}' }" > $FILENAME/src/hooks/useVersion.ts
- run: tar cJf $FILENAME.tar.xz ./$FILENAME
- uses: actions/upload-artifact@v3
with:
name: tarballs
path: tea-${{ steps.tea.outputs.version }}.tar.xz
path: ${{ env.FILENAME }}.tar.xz
if-no-files-found: error

release:
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the creator of [`brew`].
 


# tea/cli 0.22.1
# tea/cli 0.22.2

```sh
$ node --eval 'console.log("Hello World!")'
Expand Down Expand Up @@ -223,12 +223,14 @@ As a bonus the installer also updates tea.

## “Now see here fella’, I \*hate\* installers…”

Package managers can’t install themselves.
This sucks but it’s firmly stamped `#cantfix`.
How about installing with `brew` instead?
Package managers can’t install themselves (`#cantfix`).
How via `brew` or Docker instead?

```sh
$ brew install teaxyz/pkgs/tea-cli

# or just try it out first
$ docker run --rm -it ghcr.io/teaxyz/infuser
```

> <details><summary><i>Other ways to install tea</i></summary><br>
Expand Down

0 comments on commit 58d1dca

Please sign in to comment.