-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.33 KB
/
release.yml
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
name: Release App
on:
push:
tags: ["*"]
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/versions-control-ui
jobs:
build:
runs-on: ubuntu-22.04
container:
image: myjettools/dioxus-docker:0.1.2
steps:
- uses: actions/checkout@v2
- name: Update the version
id: get_version
run: |
ver=${GITHUB_REF_NAME}
echo $ver
sed -i -e 's/^version = .*/version = "'$ver'"/' Cargo.toml
- run: dx build --platform fullstack --release
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
./target/release/my-logger-ui
./dist
./Dockerfile
publish:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v2
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Docker login
run: |
echo "${{ secrets.PUBLISH_TOKEN }}" | docker login https://ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Docker Build and Publish
run: |
ver=${GITHUB_REF_NAME}
echo $ver
docker build -t ${IMAGE_NAME}:$ver .
docker push ${IMAGE_NAME}:$ver