Skip to content

Commit 727cd56

Browse files
authored
Merge pull request #14 from GDGVIT/dev
Dev
2 parents b3f73c7 + f9d46f2 commit 727cd56

File tree

5 files changed

+54
-3
lines changed

5 files changed

+54
-3
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Release
33
on:
44
push:
55
branches: [master]
6+
tags:
7+
- '*'
68

79
jobs:
810
macOS-release:
@@ -14,7 +16,7 @@ jobs:
1416
with:
1517
python-version: "3.6"
1618

17-
- name: Setup release environment
19+
- name: Setup build environment
1820
run: |
1921
pip install -r requirements.txt
2022
brew install expect
@@ -27,7 +29,7 @@ jobs:
2729
FBS_PASS: ${{ secrets.FBS_PASS }}
2830
GPG_PASS: ${{ secrets.GPG_PASS }}
2931

30-
- name: Release
32+
- name: Build Installer
3133
run: /usr/bin/expect .github/scripts/mac/release.sh
3234

3335
- name: Export setup dmg as .zip artifact
@@ -45,7 +47,7 @@ jobs:
4547
with:
4648
python-version: "3.6"
4749

48-
- name: Setup release environment
50+
- name: Setup build environment
4951
run: |
5052
pip install pywin32
5153
pip install -r requirements.txt
@@ -153,3 +155,50 @@ jobs:
153155
run: |
154156
chmod a+x .github/scripts/fedora/release.sh
155157
.github/scripts/fedora/release.sh
158+
159+
Publish:
160+
runs-on: [ubuntu-latest]
161+
needs: [macOS-release, Windows-release]
162+
163+
steps:
164+
- uses: actions/checkout@v2
165+
- uses: webfactory/ssh-agent@v0.2.0
166+
with:
167+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
168+
169+
- uses: actions/download-artifact@v2
170+
with:
171+
name: macOS dmg
172+
173+
- uses: actions/download-artifact@v2
174+
with:
175+
name: Windows Installer
176+
177+
- name: Setup release environment
178+
run: |
179+
echo "::set-env name=VERSION::$(cat version)"
180+
git config --global user.name ${{ secrets.GIT_USER }}
181+
git config --global user.email ${{ secrets.GIT_EMAIL }}
182+
183+
- name: Release
184+
uses: ncipollo/release-action@v1
185+
with:
186+
token: ${{ secrets.GITHUB_TOKEN }}
187+
allowUpdates: true
188+
tag: ${{ env.VERSION }}
189+
commit: master
190+
artifacts: "macOS dmg, Windows Installer"
191+
192+
- name: Modify website pages
193+
run: |
194+
# Cloning the website repo
195+
git clone git@github.com:GDGVIT/handwriter-website.git
196+
cd handwriter-website
197+
sed 's/{VERSION}/'"${{ env.VERSION }}"'/' templates/home.md > content/installer/home.md
198+
199+
- name: Push changes to website repo
200+
run: |
201+
cd handwriter-website
202+
git add content/installer/
203+
git commit -m "Automated website build for upstream package update"
204+
git push --force

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
env/
2+
.vscode
1.63 KB
Binary file not shown.
2.34 KB
Binary file not shown.
2.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)