just requires cargo to build (#4)

* just requires cargo to build

* add in .github workflows

* README deps
This commit is contained in:
Jacob Heider 2022-10-31 14:00:24 -04:00 committed by GitHub
parent 0903d22c26
commit 3245fb5fc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 112 additions and 3 deletions

35
.github/workflows/cd.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: cd
on:
push:
branches:
- main
jobs:
cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: >
grep -E ' github: [^\w]+/[^\w]+' projects/**/package.yml |
sed -e 's|^projects/\(.*\)/package.yml: *github: \([^/]*/[^/]*\).*|{ "project": "\1", "github": "\2" }|' |
jq -sc . |
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
-H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @-
get-diff:
runs-on: ubuntu-latest
outputs:
diff: ${{ steps.diff.outputs.diff }}
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
id: diff
with:
PATTERNS: projects/**/package.yml
build:
needs: [get-diff]
uses: teaxyz/pantry.core/.github/workflows/build.yml@main
with:
projects: ${{ needs.get-diff.outputs.diff }}
upload: true
secrets: inherit
if: ${{ needs.get-diff.outputs.diff != '' }}

18
.github/workflows/ci-scripts.yml vendored Normal file
View file

@ -0,0 +1,18 @@
on:
pull_request:
paths: scripts/**.ts
jobs:
typecheck:
runs-on: ubuntu-latest
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
steps:
- uses: actions/checkout@v3
# disabled until live because private repos are tedious
# - uses: teaxyz/setup@v0
# with:
# target: typecheck
# env:
# GITHUB_TOKEN: ${{ github.token }}

20
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: ci
on: pull_request
jobs:
get-diff:
runs-on: ubuntu-latest
outputs:
diff: ${{ steps.diff.outputs.diff }}
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
id: diff
with:
PATTERNS: projects/**/package.yml
build:
needs: [get-diff]
uses: teaxyz/pantry.core/.github/workflows/build.yml@main
with:
projects: ${{ needs.get-diff.outputs.diff || 'zlib.net' }}
secrets: inherit

17
.github/workflows/new-version.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: new-version
run-name: new-version (${{ inputs.projects }})
on:
workflow_dispatch:
inputs:
projects:
description: eg. `foo.com@1.2.3 bar.com@2.3.4`
required: true
type: string
jobs:
build:
uses: teaxyz/pantry.core/.github/workflows/build.yml@main
with:
projects: ${{ inputs.projects }}
upload: true
secrets: inherit

View file

@ -10,3 +10,24 @@ This pantry is our “at launch” complement to [pantry.core].
For now, new pantry submissions should go here.
[pantry.core]: ../../../pantry.core
# Dependencies
| Project | Version |
|-------------|---------|
| deno.land | ^1.23 |
| tea.xyz | ^0 |
## Build All
```sh
scripts/ls.ts | xargs scripts/sort.ts | xargs scripts/build.ts
```
## Typecheck
```sh
for x in scripts/*.ts src/app.ts; do
deno check --unstable --import-map=$SRCROOT/import-map.json $x
done
```

View file

@ -9,9 +9,7 @@ versions:
build:
dependencies:
rust-lang.org: ^1.47.0
# Remove if this becomes a run-dep of rust
# required for cargo to update crates.io
openssl.org: 1
rust-lang.org/cargo: ^0.65
script:
cargo install --path=. --root={{prefix}}
test: