Skip to content

Commit 4ccfd35

Browse files
committed
build: fix pipeline
1 parent 8b5f107 commit 4ccfd35

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/release.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
with:
3131
node-version: 12
3232
registry-url: https://registry.npmjs.org/
33+
- id: get_version
34+
run: |
35+
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
36+
echo "::set-output name=release_version::$RELEASE_VERSION"
3337
- name: Cache node modules
3438
uses: actions/cache@v1
3539
with:
@@ -39,6 +43,7 @@ jobs:
3943
${{ runner.os }}-node-
4044
- name: Build UI
4145
env:
46+
VERSION: ${{ steps.get_version.outputs.release_version }}
4247
NPM_CONFIG_GLOBALCONFIG: "dist/npm/config/npmrc"
4348
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_DEVSPACE_REGISTRY_TOKEN }}
4449
CI: "false"
@@ -57,6 +62,10 @@ jobs:
5762
uses: actions/setup-go@v1
5863
with:
5964
go-version: 1.17
65+
- id: get_version
66+
run: |
67+
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
68+
echo "::set-output name=release_version::$RELEASE_VERSION"
6069
- name: install-go-bindata
6170
run: go get -u github.com/go-bindata/go-bindata/...
6271
env:
@@ -70,6 +79,7 @@ jobs:
7079
- name: Compile binaries
7180
run: ./hack/build-all.bash
7281
env:
82+
VERSION: ${{ steps.get_version.outputs.release_version }}
7383
GOPATH: /Users/runner/work/devspace/go
7484
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
7585
ANALYTICS_TOKEN: ${{ secrets.ANALYTICS_TOKEN }}
@@ -90,12 +100,17 @@ jobs:
90100
with:
91101
node-version: 12
92102
registry-url: https://registry.npmjs.org/
103+
- id: get_version
104+
run: |
105+
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
106+
echo "::set-output name=release_version::$RELEASE_VERSION"
93107
- run: |
94108
npm ci
95-
export NPM_TAG=$(node index.js get-tag)
109+
export NPM_TAG=$RELEASE_VERSION
96110
npm publish --tag $NPM_TAG
97111
working-directory: ./dist/npm
98112
env:
113+
RELEASE_VERSION: ${{ steps.get_version.outputs.release_version }}
99114
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
100115
publish-next-image:
101116
if: github.ref == 'refs/heads/master'

hack/build-all.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export GOFLAGS=-mod=vendor
1313
# go mod vendor
1414

1515
DEVSPACE_ROOT=$(git rev-parse --show-toplevel)
16-
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
1716
COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null)
1817
DATE=$(date "+%Y-%m-%d")
1918
BUILD_PLATFORM=$(uname -a | awk '{print tolower($1);}')

hack/build-ui.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
set -e
44

55
DEVSPACE_ROOT=$(git rev-parse --show-toplevel)
6-
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
76

87
# Install dependencies
98
cd ui && npm install && npm run build

0 commit comments

Comments
 (0)