Skip to content

Commit 06971df

Browse files
committed
add release workflow
1 parent 72dcb89 commit 06971df

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build-and-deploy:
7+
runs-on: ubuntu-latest
8+
if: github.repository == 'taskmedia/helm_vpn-ios-profile'
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Install Helm
16+
run: |
17+
curl -L https://git.io/get_helm.sh | bash -s -- -v v3.7.1
18+
19+
- name: Create release binary
20+
run: |
21+
helm package ./ --destination release/
22+
23+
- name: Update Index
24+
env:
25+
PROJECT: github.com/taskmedia/helm_vpn-ios-profile
26+
REPO_URL: https://vpn-ios-profile.helm.task.media
27+
run: |
28+
rm -rf ./gh-pages.zip
29+
curl -sSLO https://${PROJECT}/archive/gh-pages.zip
30+
unzip -oj ./gh-pages.zip -d ./repo/
31+
cp ./release/*tgz ./repo/
32+
cp ./README.md ./repo/index.md
33+
helm repo index --merge ./repo/index.yaml --url ${REPO_URL} ./repo
34+
35+
- name: Deploy
36+
uses: JamesIves/github-pages-deploy-action@v4.2.5
37+
with:
38+
branch: gh-pages
39+
folder: repo
40+
clean: false

0 commit comments

Comments
 (0)