Skip to content

Commit 17be288

Browse files
committed
ci: add release
1 parent 6005c18 commit 17be288

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
tags:
7+
- "v*"
8+
permissions:
9+
contents: write
10+
jobs:
11+
test:
12+
name: Build and release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: "true"
19+
- name: Login to Docker Hub
20+
uses: docker/login-action@v2
21+
with:
22+
username: ${{ secrets.DOCKER_USERNAME }}
23+
password: ${{ secrets.DOCKER_PASSWORD }}
24+
- name: Extract metadata (tags, labels) for Docker
25+
id: meta
26+
uses: docker/metadata-action@v4
27+
with:
28+
images: kcllang/kcl-playground
29+
- name: Build and push Docker image
30+
uses: docker/build-push-action@v3
31+
with:
32+
context: .
33+
push: ${{ github.event_name != 'pull_request' }}
34+
tags: ${{ steps.meta.outputs.tags }}
35+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)