Skip to content

Commit c805334

Browse files
committed
fix plugin push
Signed-off-by: Markus Blaschke <[email protected]>
1 parent 67a16c5 commit c805334

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

.github/workflows/release-assets.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,23 @@ jobs:
8181
oras push \
8282
ghcr.io/${{ github.repository }}/azure-tpl-cli:${RELEASE_TAG},latest \
8383
--artifact-type application/vnd.helm.plugin.v1+json \
84-
azure-tpl-cli.tgz
84+
azure-tpl-cli-*.tgz
8585
working-directory: ./release-assets/
8686

8787
- name: Publish azure-tpl-getter
8888
run: |
8989
oras push \
9090
ghcr.io/${{ github.repository }}/azure-tpl-getter:${RELEASE_TAG},latest \
9191
--artifact-type application/vnd.helm.plugin.v1+json \
92-
azure-tpl-getter.tgz
92+
azure-tpl-getter-*.tgz
9393
working-directory: ./release-assets/
9494

9595
- name: Publish azure-tpl-legacy
9696
run: |
9797
oras push \
9898
ghcr.io/${{ github.repository }}/azure-tpl-legacy:${RELEASE_TAG},latest \
9999
--artifact-type application/vnd.helm.plugin.v1+json \
100-
azure-tpl-legacy.tgz
100+
azure-tpl-legacy-*.tgz
101101
working-directory: ./release-assets/
102102

103103
- name: Upload assets to release

Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,8 @@ plugins: plugin/azure-tpl-legacy plugin/azure-tpl-cli plugin/azure-tpl-getter
7070

7171
plugin/%: $(SOURCE)
7272
echo 'package plugin $(call word-dot,$*,1)'
73-
rm -rf ./tmp
74-
mkdir -p ./tmp
75-
helm plugin package 'plugins/$(call word-dot,$*,1)' -d ./tmp --sign=false
76-
mv tmp/azure-tpl*.tgz 'release-assets/$(call word-dot,$*,1).tgz'
77-
rm -rf ./tmp
73+
mkdir -p ./release-assets/
74+
helm plugin package 'plugins/$(call word-dot,$*,1)' -d ./release-assets --sign=false
7875

7976
#######################################
8077
# release assets
@@ -95,7 +92,7 @@ RELEASE_ASSETS_DARWIN = \
9592
word-dot = $(word $2,$(subst ., ,$1))
9693

9794
.PHONY: release-assets
98-
release-assets: clean-release-assets vendor $(RELEASE_ASSETS_LINUX) $(RELEASE_ASSETS_DARWIN) $(RELEASE_ASSETS_WINDOWS) release-assets/helm-plugin
95+
release-assets: clean-release-assets vendor $(RELEASE_ASSETS_LINUX) $(RELEASE_ASSETS_DARWIN) $(RELEASE_ASSETS_WINDOWS)
9996

10097
.PHONY: release-assets-linux
10198
release-assets-linux: $(RELEASE_ASSETS_LINUX)
@@ -124,13 +121,3 @@ release-assets/%: $(SOURCE)
124121
GOARCH=$(call word-dot,$*,2) \
125122
CGO_ENABLED=0 \
126123
time go build -ldflags '$(LDFLAGS)' -o './release-assets/$(PROJECT_NAME).$(call word-dot,$*,1).$(call word-dot,$*,2)' .
127-
128-
.PHONY: release-assets/helm-plugin
129-
release-assets/helm-plugin:
130-
echo 'build helm plugin'
131-
rm -rf ./tmp
132-
mkdir -p ./tmp/helm-azure-tpl
133-
cp -- plugin.yaml ./tmp/helm-azure-tpl
134-
cp -a ./release-assets/* ./tmp/helm-azure-tpl
135-
bash -c 'cd ./tmp/helm-azure-tpl/ && tar --exclude *.tgz -czvf ../../release-assets/helm-plugin.tgz *'
136-
rm -rf ./tmp

0 commit comments

Comments
 (0)