File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 37
37
- run : deno task dnt
38
38
- run : bun run ./test_runner.js
39
39
working-directory : ${{ github.workspace }}/npm/
40
+
41
+ publish :
42
+ if : github.event_name == 'push'
43
+ needs : [test]
44
+ runs-on : ubuntu-latest
45
+ permissions :
46
+ contents : read
47
+ id-token : write
48
+ steps :
49
+ - uses : actions/checkout@v4
50
+ - uses : denoland/setup-deno@v1
51
+ with :
52
+ deno-version : v1.x
53
+ - uses : actions/setup-node@v4
54
+ with :
55
+ node-version : lts/*
56
+ - if : github.ref_type == 'branch'
57
+ run : |
58
+ jq \
59
+ --arg build "$GITHUB_RUN_NUMBER" \
60
+ --arg commit "${GITHUB_SHA::8}" \
61
+ '.version = .version + "-dev." + $build + "+" + $commit' \
62
+ deno.json > deno.json.tmp
63
+ mv deno.json.tmp deno.json
64
+ - if : github.ref_type == 'tag'
65
+ run : ' [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]'
66
+ - run : ' deno task dnt "$(jq -r .version deno.json)"'
67
+ - run : |
68
+ set -ex
69
+ npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
70
+ if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
71
+ npm publish --provenance --access public
72
+ else
73
+ npm publish --provenance --access public --tag dev
74
+ fi
75
+ env:
76
+ NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
77
+ working-directory: ${{ github.workspace }}/npm/
78
+ - run : deno publish --allow-dirty
Original file line number Diff line number Diff line change 3
3
@fedify/redis
4
4
=============
5
5
6
+ [ ![ JSR] [ JSR badge ]] [ JSR ]
7
+ [ ![ npm] [ npm badge ]] [ npm ]
8
+ [ ![ GitHub Actions] [ GitHub Actions badge ]] [ GitHub Actions ]
9
+
6
10
Redis drivers for Fedify.
11
+
12
+ [ JSR ] : https://jsr.io/@fedify/redis
13
+ [ JSR badge ] : https://jsr.io/badges/@fedify/redis
14
+ [ npm ] : https://www.npmjs.com/package/@fedify/redis
15
+ [ npm badge ] : https://img.shields.io/npm/v/@fedify/redis?logo=npm
16
+ [ GitHub Actions ] : https://github.com/dahlia/fedify-redis/actions/workflows/main.yaml
17
+ [ GitHub Actions badge ] : https://github.com/dahlia/fedify-redis/actions/workflows/main.yaml/badge.svg
You can’t perform that action at this time.
0 commit comments