-
Notifications
You must be signed in to change notification settings - Fork 410
124 lines (122 loc) · 4.01 KB
/
release.yaml
File metadata and controls
124 lines (122 loc) · 4.01 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Test & Release CLI Version
on:
release:
types: [created]
push:
branches:
- main
paths:
- "Dockerfile"
- "**.go"
- "hack/coverage.bash"
- ".github/workflows/release.yaml"
pull_request:
branches:
- main
paths:
- "Dockerfile"
- "**.go"
- "hack/coverage.bash"
- ".github/workflows/release.yaml"
jobs:
release-ui:
if: startsWith(github.ref, 'refs/tags/v') == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 20
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
echo "::set-output name=release_version::$RELEASE_VERSION"
- name: Cache node modules
uses: actions/cache@v4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/ui/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build UI
env:
VERSION: ${{ steps.get_version.outputs.release_version }}
CI: "false"
run: ./hack/build-ui.bash
- name: Upload ui tar
uses: actions/upload-artifact@v4
with:
name: ui-tar
path: release/ui.tar.gz
release:
if: startsWith(github.ref, 'refs/tags/v') == true
needs: [ release-ui ]
runs-on: macos-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
echo "::set-output name=release_version::$RELEASE_VERSION"
- name: install-go-bindata
run: go install github.com/go-bindata/go-bindata/go-bindata@latest
env:
GOPATH: /Users/runner/work/devspace/go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Download ui tar
uses: actions/download-artifact@v4
with:
name: ui-tar
- name: Compile binaries
run: ./hack/build-all.bash
env:
VERSION: ${{ steps.get_version.outputs.release_version }}
GOPATH: /Users/runner/work/devspace/go
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ANALYTICS_TOKEN: ${{ secrets.ANALYTICS_TOKEN }}
ANALYTICS_ENDPOINT_EVENT: ${{ secrets.ANALYTICS_ENDPOINT_EVENT }}
ANALYTICS_ENDPOINT_USER: ${{ secrets.ANALYTICS_ENDPOINT_USER }}
- name: Publish
uses: FabianKramm/release-asset-action@v1
with:
pattern: "release/*"
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-next-image:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: jerray/publish-docker-action@v1.0.3
with:
tags: next
repository: devspacesh/devspace
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
publish-release-images:
if: startsWith(github.ref, 'refs/tags/v') == true
needs: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
echo "::set-output name=release_version::$RELEASE_VERSION"
- uses: jerray/publish-docker-action@v1.0.3
with:
auto_tag: true
repository: devspacesh/devspace
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build_args: RELEASE_VERSION=${{ steps.get_version.outputs.release_version }}
- uses: jerray/publish-docker-action@v1.0.3
with:
tags: latest
repository: devspacesh/devspace
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build_args: RELEASE_VERSION=${{ steps.get_version.outputs.release_version }}