forked from hexatomic/hexatomic
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (95 loc) · 4.43 KB
/
release.yml
File metadata and controls
96 lines (95 loc) · 4.43 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Deploy release binaries and documentation
on:
push:
tags:
- v*
jobs:
deploy_binaries:
name: Deploy release Windows and Linux binaries
runs-on: ubuntu-20.04
steps:
- name: Install metacity window manager for background tests
run: sudo apt-get install metacity
- name: Checkout
uses: actions/checkout@v2
- name: Set JAVA_HOME to OpenJDK 11
run: echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
- name: Run Maven install (includes tests)
run: ./releng/sh/metacity-run.sh mvn clean install
env:
LANG: en_US.UTF-8
- name: Update CFF file
run: mvn -f ./features/org.corpus_tools.hexatomic/pom.xml cff:create
env:
LANG: en_US.UTF-8
- name: Build again with updated CFF file
run: ./releng/sh/metacity-run.sh mvn clean verify
env:
LANG: en_US.UTF-8
- name: Release assets on GitHub
uses: softprops/action-gh-release@v0.1.5
with:
files: |
releng/org.corpus_tools.hexatomic.product/target/products/hexatomic-*-linux.gtk.x86_64.zip
releng/org.corpus_tools.hexatomic.product/target/products/hexatomic-*-win32.win32.x86_64.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy_macos:
name: Deploy release MacOS binaries
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set JAVA_HOME to OpenJDK 11
run: echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
- name: Run Maven install (excludes tests since they currently fail on macOS)
run: mvn -DskipTests clean install
env:
LANG: en_US.UTF-8
- name: Update CFF file
run: mvn -f ./features/org.corpus_tools.hexatomic/pom.xml cff:create
env:
LANG: en_US.UTF-8
- name: Build again with updated CFF file
run: mvn -DskipTests clean verify
env:
LANG: en_US.UTF-8
- name: Remove code sign from generated app folder
run: codesign --remove-signature releng/org.corpus_tools.hexatomic.product/target/products/org.corpus_tools.hexatomic.product/macosx/cocoa/x86_64/hexatomic.app
- name: Create zip file from app folder
run: zip -r hexatomic_unsigned.zip hexatomic.app/
working-directory: releng/org.corpus_tools.hexatomic.product/target/products/org.corpus_tools.hexatomic.product/macosx/cocoa/x86_64/
- name: Replace macOS release asset with the unsigned zip file
run: mv releng/org.corpus_tools.hexatomic.product/target/products/org.corpus_tools.hexatomic.product/macosx/cocoa/x86_64/hexatomic_unsigned.zip releng/org.corpus_tools.hexatomic.product/target/products/hexatomic-*-macosx.cocoa.x86_64.zip
- name: Release assets on GitHub
uses: softprops/action-gh-release@v0.1.5
with:
files: releng/org.corpus_tools.hexatomic.product/target/products/hexatomic-*-macosx.cocoa.x86_64.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy_documentation:
name: Deploy documentation
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download and install mdBook
run: curl -L -o mdbook.tar.gz https://github.com/rust-lang-nursery/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && tar -C $HOME/.cargo/bin/ -zvxf mdbook.tar.gz
env:
MDBOOK_VERSION: 0.3.1
- name: Get the release version from the GITHUB_REF variable as new SHORT_VERSION variable
run: echo "SHORT_VERSION=$(echo ${GITHUB_REF} | sed -E 's/^refs\/heads\/.*/develop/' | sed -E 's/^(refs\/tags\/v)?(.*)(\.[0-9]+)$/v\2/')" >> $GITHUB_ENV
# Build all documentation
- run: mdbook build --dest-dir book/user/${SHORT_VERSION} docs/user/
- run: mdbook build --dest-dir book/dev/${SHORT_VERSION} docs/dev/
- name: Checkout and prepare GitHub pages branch
run: releng/sh/prepare-deploy-docs.sh
# We use a special action to perform the push, so we can use the automatically created token
- name: Push changes to GitHub pages branch
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: gh-pages
branch: gh-pages