Skip to content

Commit

Permalink
Merge pull request #14 from GDGVIT/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
L04DB4L4NC3R authored May 5, 2020
2 parents b3f73c7 + f9d46f2 commit 727cd56
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
55 changes: 52 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Release
on:
push:
branches: [master]
tags:
- '*'

jobs:
macOS-release:
Expand All @@ -14,7 +16,7 @@ jobs:
with:
python-version: "3.6"

- name: Setup release environment
- name: Setup build environment
run: |
pip install -r requirements.txt
brew install expect
Expand All @@ -27,7 +29,7 @@ jobs:
FBS_PASS: ${{ secrets.FBS_PASS }}
GPG_PASS: ${{ secrets.GPG_PASS }}

- name: Release
- name: Build Installer
run: /usr/bin/expect .github/scripts/mac/release.sh

- name: Export setup dmg as .zip artifact
Expand All @@ -45,7 +47,7 @@ jobs:
with:
python-version: "3.6"

- name: Setup release environment
- name: Setup build environment
run: |
pip install pywin32
pip install -r requirements.txt
Expand Down Expand Up @@ -153,3 +155,50 @@ jobs:
run: |
chmod a+x .github/scripts/fedora/release.sh
.github/scripts/fedora/release.sh
Publish:
runs-on: [ubuntu-latest]
needs: [macOS-release, Windows-release]

steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- uses: actions/download-artifact@v2
with:
name: macOS dmg

- uses: actions/download-artifact@v2
with:
name: Windows Installer

- name: Setup release environment
run: |
echo "::set-env name=VERSION::$(cat version)"
git config --global user.name ${{ secrets.GIT_USER }}
git config --global user.email ${{ secrets.GIT_EMAIL }}
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: ${{ env.VERSION }}
commit: master
artifacts: "macOS dmg, Windows Installer"

- name: Modify website pages
run: |
# Cloning the website repo
git clone git@github.com:GDGVIT/handwriter-website.git
cd handwriter-website
sed 's/{VERSION}/'"${{ env.VERSION }}"'/' templates/home.md > content/installer/home.md
- name: Push changes to website repo
run: |
cd handwriter-website
git add content/installer/
git commit -m "Automated website build for upstream package update"
git push --force
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
env/
.vscode
Binary file added src/__pycache__/document_parser.cpython-36.pyc
Binary file not shown.
Binary file added src/__pycache__/line_parser.cpython-36.pyc
Binary file not shown.
Binary file added src/__pycache__/page_parser.cpython-36.pyc
Binary file not shown.

0 comments on commit 727cd56

Please sign in to comment.