Skip to content

Commit

Permalink
Merge db51166 into d2ed756
Browse files Browse the repository at this point in the history
  • Loading branch information
tugrulates authored Feb 11, 2025
2 parents d2ed756 + db51166 commit b774f2b
Show file tree
Hide file tree
Showing 26 changed files with 5,457 additions and 239 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Bump

on:
workflow_dispatch:

pull_request: # todo: rm
branches: [main]

jobs:
bump:
# todo: rm
if: github.event.pull_request.head.ref == 'ci/release'

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup
uses: denoland/setup-deno@v2

- name: Bump versions
run: deno task version --bump
env:
GITHUB_ACTOR: "${{ github.actor }}"
GITHUB_EMAIL: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 2 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

build:
strategy:
matrix:
target: [
"x86_64-pc-windows-msvc",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
]

runs-on: ubuntu-latest

steps:
Expand All @@ -62,13 +52,8 @@ jobs:
uses: denoland/setup-deno@v2

- name: Build
run: COMPILE_ARGS="--target=${{ matrix.target }}" deno task build

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: dist/
# https://github.com/denoland/deno/issues/27988
run: deno task compile --concurrency=1

publish:
runs-on: ubuntu-latest
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Release

on: workflow_dispatch
on:
workflow_dispatch:

pull_request: # todo: rm
branches: [main]

jobs:
build:
name: version bump
release:
# todo: rm
if: github.event.pull_request.head.ref == 'test'

runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
Expand All @@ -18,9 +23,7 @@ jobs:
- name: Setup
uses: denoland/setup-deno@v2

- name: Bump versions
run: deno run -A jsr:@deno/bump-workspaces@^0.1.22/cli
- name: Release packages
run: deno task version --release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GIT_USER_NAME: ${{ github.actor }}
GIT_USER_EMAIL: ${{ github.actor}}@users.noreply.github.com
8 changes: 6 additions & 2 deletions 500px/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "@tugrulates/500px",
"version": "0.1.2",
"exports": "./mod.ts",
"tasks": {
"compile": "deno compile $COMPILE_ARGS -N=api.500px.com --no-prompt --include=deno.json --include=graphql -o=../dist/ mod.ts"
"compile": {
"main": "mod.ts",
"include": ["graphql"],
"permissions": {
"net": "api.500px.com"
}
}
}
4 changes: 2 additions & 2 deletions 500px/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Command, EnumType } from "@cliffy/command";
import { Table } from "@cliffy/table";
import { getPackage } from "@tugrulates/internal/package";
import { displayVersion } from "@tugrulates/internal/package";
import { FiveHundredPxClient } from "./client.ts";
import { CATEGORIES } from "./data.ts";
import type { Photo } from "./types.ts";
Expand Down Expand Up @@ -130,7 +130,7 @@ async function getCommand() {
.name("500px")
.description("Interact with 500px.")
.usage("<command> [options]")
.version((await getPackage()).version ?? "")
.version(await displayVersion())
.action((): void => command.showHelp())
.command("discover", getDiscoverCommand())
.command("follows", getFollowsCommand())
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ These can be installed from the source.
```sh
git clone https://github.com/tugrulates/repo.git
cd repo
deno task install
deno task install duolingo
duolingo --help
```

You can also run the JSR packages directly.
Expand Down
84 changes: 0 additions & 84 deletions Releases.md

This file was deleted.

17 changes: 12 additions & 5 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
"./testing"
],
"tasks": {
"build": "deno task --recursive compile",
"install": {
"command": "mkdir -p $HOME/.local/bin && cp dist/* $HOME/.local/bin",
"dependencies": ["build"]
},
"version": "deno run -A internal/version.ts",
"compile": "deno run -A internal/compile.ts",
"install": "deno task compile --install=$HOME/.local/bin",
"test": "deno test -A --unstable-kv --doc **/*.ts",
"coverage": "deno task test --coverage && deno coverage --html",
"lint": "deno fmt -q --check && deno lint -q && deno check -q **/*.ts",
"doc": "deno doc --lint --html $(find . -path '**/*.ts' -type file)",
"ok": "deno task lint && deno task doc && deno task test"
Expand Down Expand Up @@ -44,11 +43,19 @@
"@cliffy/prompt": "jsr:@cliffy/prompt@1.0.0-rc.7",
"@cliffy/table": "jsr:@cliffy/table@1.0.0-rc.7",
"@david/which": "jsr:@david/which@^0.4.1",
"@octokit/openapi-types": "npm:@octokit/openapi-types@^23.0.1",
"@octokit/rest": "npm:@octokit/rest@^21.1.0",
"@std/assert": "jsr:@std/assert@^1.0.11",
"@std/async": "jsr:@std/async@^1.0.10",
"@std/cli": "jsr:@std/cli@^1.0.11",
"@std/collections": "jsr:@std/collections@^1.0.10",
"@std/crypto": "jsr:@std/crypto@^1.0.4",
"@std/encoding": "jsr:@std/encoding@^1.0.7",
"@std/fmt": "jsr:@std/fmt@^1.0.5",
"@std/fs": "jsr:@std/fs@^1.0.10",
"@std/path": "jsr:@std/path@^1.0.8",
"@std/regexp": "jsr:@std/regexp@^1.0.1",
"@std/semver": "jsr:@std/semver@^1.0.3",
"@std/testing": "jsr:@std/testing@^1.0.9",
"@std/text": "jsr:@std/text@^1.0.9",
"@urql/core": "npm:@urql/core@^5.1.0",
Expand Down
Loading

0 comments on commit b774f2b

Please sign in to comment.