Skip to content

Commit 85f3e6d

Browse files
committed
fix: semantic versioning in GH action, disable docker publish
1 parent 06ed973 commit 85f3e6d

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/build.yml

+28-23
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ on:
77

88
jobs:
99
release:
10-
name: Release
1110
runs-on: ubuntu-18.04
11+
outputs:
12+
version: ${{ steps.semantic.outputs.new_release_version }}
1213
steps:
13-
- uses: softprops/action-gh-release@v1
14+
- uses: actions/checkout@v2
15+
- name: Semantic Release
16+
id: semantic
17+
uses: cycjimmy/semantic-release-action@v2
18+
with:
19+
extra_plugins: |
20+
@semantic-release/commit-analyzer
21+
@semantic-release/release-notes-generator
22+
@semantic-release/github
1423
env:
1524
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16-
with:
17-
name: test-release
18-
tag_name: 0.0.1
1925

2026
build-x86:
2127
name: Build x64 binary
@@ -44,37 +50,36 @@ jobs:
4450
mv bin/server-linux bin/storage-api-x86_64
4551
tar -czvf storage-api-linux-x64.tar.gz -C ./bin storage-api-x86_64
4652
tar -czvf storage-api-macos-x64.tar.gz -C ./bin storage-api-macos-x86_64
47-
4853
- name: Upload x64 binary to release
4954
uses: svenstaro/upload-release-action@v2
5055
with:
5156
repo_token: ${{ secrets.GITHUB_TOKEN }}
5257
file: storage-api-linux-x64.tar.gz
53-
tag: 0.0.1
58+
tag: v${{ needs.release.outputs.version }}
5459
asset_name: storage-api-linux-x86_64.tar.gz
5560
overwrite: true
5661
- name: Upload macos binary to release
5762
uses: svenstaro/upload-release-action@v2
5863
with:
5964
repo_token: ${{ secrets.GITHUB_TOKEN }}
6065
file: storage-api-macos-x64.tar.gz
61-
tag: 0.0.1
66+
tag: v${{ needs.release.outputs.version }}
6267
asset_name: storage-api-macos-x86_64.tar.gz
6368
overwrite: true
64-
- name: Set up Docker Buildx
65-
uses: docker/setup-buildx-action@v1
66-
- name: Login to DockerHub
67-
uses: docker/login-action@v1
68-
with:
69-
username: ${{ secrets.DOCKER_USERNAME }}
70-
password: ${{ secrets.DOCKER_PASSWORD }}
71-
- name: Build and push
72-
uses: docker/build-push-action@v2
73-
with:
74-
context: .
75-
file: gh-Dockerfile
76-
push: true
77-
tags: supabase/storage-api:latest,supabase/storage-api:0.0.1
69+
# - name: Set up Docker Buildx
70+
# uses: docker/setup-buildx-action@v1
71+
# - name: Login to DockerHub
72+
# uses: docker/login-action@v1
73+
# with:
74+
# username: ${{ secrets.DOCKER_USERNAME }}
75+
# password: ${{ secrets.DOCKER_PASSWORD }}
76+
# - name: Build and push
77+
# uses: docker/build-push-action@v2
78+
# with:
79+
# context: .
80+
# file: gh-Dockerfile
81+
# push: true
82+
# tags: supabase/storage-api:latest,supabase/storage-api:0.0.1
7883

7984
build-arm:
8085
name: Build ARM64 artifact
@@ -123,6 +128,6 @@ jobs:
123128
repo_token: ${{ secrets.GITHUB_TOKEN }}
124129
file: artifacts/storage-api-aarch64.tar.gz
125130
asset_name: storage-api-linux-aarch64.tar.gz
126-
tag: 0.0.1
131+
tag: v${{ needs.release.outputs.version }}
127132
overwrite: true
128133

0 commit comments

Comments
 (0)