-
Notifications
You must be signed in to change notification settings - Fork 147
50 lines (41 loc) · 1.33 KB
/
release.yml
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
name: release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 6
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# Enable conversion to PDF
- run: sudo sed -i 's/policy domain="coder" rights="none" pattern="PDF"/policy domain="coder" rights="read | write" pattern="PDF"'/ /etc/ImageMagick-6/policy.xml
# Install packages and build
- run: npm clean-install .
- run: npm run lint
- run: npm run test
- run: npm run build
- run: ./makedeb.sh
# We may need the package name for a release later (if not the dev branch and it's node 12)
- name: Retrieve package name
run: |
echo "PACKAGE_NAME=$(ls ./debian/ | grep .*\.deb)" >> $GITHUB_ENV
# Create a draft release with asset if there's a package
- name: Create Release
id: create_release
if: env.PACKAGE_NAME
uses: softprops/action-gh-release@v1
with:
draft: true
files: ./debian/${{ env.PACKAGE_NAME }}
name: Release ${{ github.ref }}
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}