|
1 |
| -name: Release |
2 |
| - |
3 |
| -# This will trigger the action on each push to the `release` branch. |
4 |
| -on: |
5 |
| - push: |
6 |
| - branches: |
7 |
| - - release |
8 |
| - |
9 |
| -jobs: |
10 |
| - build-ubuntu: |
11 |
| - name: Build the repository on Ubuntu |
12 |
| - runs-on: ubuntu-latest |
13 |
| - steps: |
14 |
| - - name: Checkout |
15 |
| - |
16 |
| - - name: Use Node.js 18 |
17 |
| - |
18 |
| - with: |
19 |
| - cache: 'npm' |
20 |
| - node-version: 18 |
21 |
| - - name: Update npm |
22 |
| - run: sudo npm install -g npm |
23 |
| - - name: Install electron |
24 |
| - run: sudo npm install -g electron --unsafe-perm=true --allow-root |
25 |
| - - name: Install npm packages |
26 |
| - run: sudo npm ci |
27 |
| - - name: Install dpkg, fakeroot and rpm |
28 |
| - run: | |
29 |
| - sudo apt-get update -y |
30 |
| - sudo apt-get install -y dpkg fakeroot rpm |
31 |
| - - name: Provide 777 execution rights to clipboard handler script |
32 |
| - run: | |
33 |
| - sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-linux |
34 |
| - sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-mac |
35 |
| - - name: Set NODE_ENV to 'production' |
36 |
| - run: export NODE_ENV=production |
37 |
| - - name: Make |
38 |
| - run: sudo npm run make --if-present |
39 |
| - - run: sudo tree . -I 'node_modules|japreader-linux-x64' |
40 |
| - - name: Upload a Build Artifact |
41 |
| - |
42 |
| - with: |
43 |
| - name: japReader-artifacts ubuntu-latest |
44 |
| - path: out/make/ |
45 |
| - retention-days: 1 |
46 |
| - build-windows: |
47 |
| - name: Build the repository on Windows |
48 |
| - runs-on: windows-latest |
49 |
| - steps: |
50 |
| - - name: Checkout |
51 |
| - |
52 |
| - - name: Use Node.js 18 |
53 |
| - |
54 |
| - with: |
55 |
| - cache: 'npm' |
56 |
| - node-version: 18 |
57 |
| - - name: Update npm |
58 |
| - run: npm install -g npm |
59 |
| - - name: Install npm packages |
60 |
| - run: npm ci |
61 |
| - - name: Set NODE_ENV to 'production' |
62 |
| - run: SET NODE_ENV=production |
63 |
| - - name: Make |
64 |
| - run: npm run make --if-present |
65 |
| - - run: tree . |
66 |
| - - name: Upload a Build Artifact |
67 |
| - |
68 |
| - with: |
69 |
| - name: japReader-artifacts windows-latest |
70 |
| - path: out/make/ |
71 |
| - retention-days: 1 |
72 |
| - release: |
73 |
| - name: Create a new github release |
74 |
| - permissions: |
75 |
| - contents: write |
76 |
| - runs-on: ubuntu-latest |
77 |
| - needs: [build-ubuntu, build-windows] |
78 |
| - steps: |
79 |
| - - name: Checkout |
80 |
| - |
81 |
| - - name: Download Linux Build Artifacts |
82 |
| - |
83 |
| - with: |
84 |
| - name: japReader-artifacts ubuntu-latest |
85 |
| - path: make/ |
86 |
| - - name: Download Windows Build Artifacts |
87 |
| - |
88 |
| - with: |
89 |
| - name: japReader-artifacts windows-latest |
90 |
| - path: make/ |
91 |
| - - name: Get current package version |
92 |
| - uses: martinbeentjes/[email protected] |
93 |
| - - name: Get Release body from CHANGELOG.md |
94 |
| - run: sed -e '/^$/,$d' CHANGELOG.md > CHANGELOG-${{ steps.package-version.outputs.current-version }}.md |
95 |
| - - run: tree . |
96 |
| - - name: Release |
97 |
| - uses: softprops/action-gh-release@v1 |
98 |
| - with: |
99 |
| - draft: true |
100 |
| - body_path: CHANGELOG-${{ steps.package-version.outputs.current-version }}.md |
101 |
| - files: | |
102 |
| - make/deb/x64/*.deb |
103 |
| - make/rpm/x64/*.rpm |
104 |
| - make/zip/linux/x64/*.zip |
105 |
| - make/zip/win32/x64/*.zip |
106 |
| - make/squirrel.windows/x64/*.exe |
107 |
| - Anki_japReader.apkg |
108 |
| - tag_name: ${{ steps.package-version.outputs.current-version }} |
| 1 | +name: Release |
| 2 | + |
| 3 | +# This will trigger the action on each push to the `release` branch. |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - release |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-ubuntu: |
| 11 | + name: Build the repository on Ubuntu |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + |
| 16 | + - name: Use Node.js 18 |
| 17 | + |
| 18 | + with: |
| 19 | + cache: "npm" |
| 20 | + node-version: 18 |
| 21 | + - name: Update npm |
| 22 | + run: sudo npm install -g npm |
| 23 | + - name: Install electron |
| 24 | + run: sudo npm install -g electron --unsafe-perm=true --allow-root |
| 25 | + - name: Install npm packages |
| 26 | + run: sudo npm ci |
| 27 | + - name: Install dpkg, fakeroot and rpm |
| 28 | + run: | |
| 29 | + sudo apt-get update -y |
| 30 | + sudo apt-get install -y dpkg fakeroot rpm |
| 31 | + - name: Provide 777 execution rights to clipboard handler script |
| 32 | + run: | |
| 33 | + sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-linux |
| 34 | + sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-mac |
| 35 | + - name: Set NODE_ENV to 'production' |
| 36 | + run: export NODE_ENV=production |
| 37 | + - name: Make |
| 38 | + run: sudo npm run make --if-present |
| 39 | + - run: sudo tree . -I 'node_modules|japreader-linux-x64' |
| 40 | + - name: Upload a Build Artifact |
| 41 | + |
| 42 | + with: |
| 43 | + name: japReader-artifacts ubuntu-latest |
| 44 | + path: out/make/ |
| 45 | + retention-days: 1 |
| 46 | + build-windows: |
| 47 | + name: Build the repository on Windows |
| 48 | + runs-on: windows-latest |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + |
| 52 | + - name: Use Node.js 18 |
| 53 | + |
| 54 | + with: |
| 55 | + cache: "npm" |
| 56 | + node-version: 18 |
| 57 | + - name: Update npm |
| 58 | + run: npm install -g npm |
| 59 | + - name: Install npm packages |
| 60 | + run: npm ci |
| 61 | + - name: Set NODE_ENV to 'production' |
| 62 | + run: SET NODE_ENV=production |
| 63 | + - name: Make |
| 64 | + run: npm run make --if-present |
| 65 | + - run: tree . |
| 66 | + - name: Upload a Build Artifact |
| 67 | + |
| 68 | + with: |
| 69 | + name: japReader-artifacts windows-latest |
| 70 | + path: out/make/ |
| 71 | + retention-days: 1 |
| 72 | + release: |
| 73 | + name: Create a new github release |
| 74 | + permissions: |
| 75 | + contents: write |
| 76 | + runs-on: ubuntu-latest |
| 77 | + needs: [build-ubuntu, build-windows] |
| 78 | + steps: |
| 79 | + - name: Checkout |
| 80 | + |
| 81 | + - name: Download Linux Build Artifacts |
| 82 | + |
| 83 | + with: |
| 84 | + name: japReader-artifacts ubuntu-latest |
| 85 | + path: make/ |
| 86 | + - name: Download Windows Build Artifacts |
| 87 | + |
| 88 | + with: |
| 89 | + name: japReader-artifacts windows-latest |
| 90 | + path: make/ |
| 91 | + - name: Get current package version |
| 92 | + uses: martinbeentjes/[email protected] |
| 93 | + - name: Get Release body from CHANGELOG.md |
| 94 | + run: sed -e '/^$/,$d' CHANGELOG.md > CHANGELOG-${{ steps.package-version.outputs.current-version }}.md |
| 95 | + - run: tree . |
| 96 | + - name: Release |
| 97 | + uses: softprops/action-gh-release@v1 |
| 98 | + with: |
| 99 | + draft: true |
| 100 | + body_path: CHANGELOG-${{ steps.package-version.outputs.current-version }}.md |
| 101 | + files: | |
| 102 | + make/deb/x64/*.deb |
| 103 | + make/rpm/x64/*.rpm |
| 104 | + make/zip/linux/x64/*.zip |
| 105 | + make/zip/win32/x64/*.zip |
| 106 | + make/squirrel.windows/x64/*.exe |
| 107 | + Anki_japReader.apkg |
| 108 | + tag_name: ${{ steps.package-version.outputs.current-version }} |
0 commit comments