-
Notifications
You must be signed in to change notification settings - Fork 3
/
create-release.sh
executable file
·54 lines (43 loc) · 1.49 KB
/
create-release.sh
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
#!/bin/bash
set -o allexport; source .github.env; set +o allexport
set -o allexport; source .release.env; set +o allexport
# You need to create a .github.env file with these variables
# - GITHUB_TOKEN
: <<'COMMENT'
Todo:
- update of .release.env:
- TAG
- MESSAGE
- IMAGE_TAG
- GITPOD_IMAGE_TAG (only if needed)
- update of ./scratch/main.go
- update of README.md
- update of generators/docker.image.txt
- update of generators/simplism.version.txt
- update of k8S/.env
- update of k8S/README.md
- update the kubernetes manifest (docker image)
- update tag in 02-wasm-registry-with-two-pods.md
- update tag in 01-wasm-function-in-a-pod.md
COMMENT
cd ./scratch
tinygo build -scheduler=none --no-debug \
-o ../server/embedded/scratch.wasm \
-target wasi main.go
cd ../
echo "$TAG $MESSAGE"
echo -n $MESSAGE > cmds/version.txt
find . -name '.DS_Store' -type f -delete
git add .
git commit -m "📦 ${MESSAGE}"
git tag -a ${TAG} -m "${MESSAGE}"
git push origin ${TAG}
#goreleaser release --snapshot --clean
goreleaser release --clean
gh release upload ${TAG} ./k8s/manifests/deploy-wasm-from-remote.yaml
gh release upload ${TAG} ./k8s/manifests/deploy-wasm-from-volume.yaml
gh release upload ${TAG} ./k8s/manifests/deploy-wasm-registry.yaml
gh release upload ${TAG} ./k8s/manifests/deploy-wasm-from-registry.yaml
gh release upload ${TAG} ./k8s/manifests/wasm-registry-volume.yaml
gh release upload ${TAG} ./k8s/manifests/wasm-files-volume.yaml
echo "👋 Create the 🐳 image manually with dockerize-simplism.sh"