-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (82 loc) · 2.84 KB
/
release.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to git
run: |
git pull
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Determine next version
id: next-version
run: |
NEW_VERSION=$(pnpm release:minor --ci --release-version | tail -n1)
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
#
# - name: Setup Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Login to ghcr.io
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Build @avelin/app
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./apps/web/Dockerfile
# push: true
# tags: ghcr.io/avelinapp/web:latest,ghcr.io/avelinapp/web:${{ steps.next_version.outputs.new_version }},ghcr.io/avelinapp/web:v${{ steps.next_version.outputs.new_version }}
# build-args: NEXT_PUBLIC_APP_URL=https://avelin.app,NEXT_PUBLIC_API_URL=https://api.avelin.app,NEXT_PUBLIC_SYNC_URL=wss://sync.avelin.app
# platforms: linux/amd64
#
# - name: Build @avelin/api
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./apps/api/Dockerfile
# push: true
# tags: ghcr.io/avelinapp/api:latest,ghcr.io/avelinapp/api:${{ steps.next_version.outputs.new_version }},ghcr.io/avelinapp/api:v${{ steps.next_version.outputs.new_version }}
# platforms: linux/amd64
#
# - name: Build @avelin/sync
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./apps/sync/Dockerfile
# push: true
# tags: ghcr.io/avelinapp/sync:latest,ghcr.io/avelinapp/sync:${{ steps.next_version.outputs.new_version }},ghcr.io/avelinapp/sync:v${{ steps.next_version.outputs.new_version }}
# platforms: linux/amd64
- name: Bump version
run: |
pnpm release:minor --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}