-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.61 KB
/
release.yml
File metadata and controls
69 lines (57 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: release
on:
release:
types: [published]
jobs:
npm-release:
name: Publish to npm
if: github.event.release.prerelease == false
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ./packages/chronicle
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
working-directory: .
- name: Build CLI
run: bun build-cli.ts
- name: Bump version
run: bun scripts/bump-version.ts
env:
GIT_REFNAME: ${{ github.ref_name }}
- name: Copy README
run: cp ../../README.md .
- name: Publish
run: bun publish --access public
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
docker-release:
name: Publish to Docker Hub
if: github.event.release.prerelease == false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
raystack/chronicle:${{ env.VERSION }}
raystack/chronicle:latest