-
Notifications
You must be signed in to change notification settings - Fork 1
146 lines (145 loc) · 7.43 KB
/
publish-package.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Release
on:
release:
types: [created]
jobs:
publish-ironpdf:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Replace credentials #ironpdf-cloud will copy config.properties in mvn step
run: |
sed -i 's/TEST_LICENSE_KEY/${{ secrets.IRONPDF_LICENSE_KEY }}/g' IronPdf/src/test/resources/config.properties
- name: Replace version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' IronPdf/pom.xml
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' IronPdf-Cloud/pom.xml
- name: Install Linux packages
run: |
sudo apt update
sudo apt-get install -y fontconfig libturbojpeg libx11-6 libxext6 libxrender1 libglib2.0-dev libnss3 atk1.0 libatk-bridge2.0-dev libx11-xcb-dev libxcb-dri3-dev libxcomposite-dev libxdamage1 libdrm-dev libxrandr2 libgbm-dev libasound2-dev libpango1.0-dev
sudo apt-get install -y software-properties-common fonts-noto fonts-ancient-scripts gsfonts
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install -y gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo apt-get install -y xvfb libva-dev libgdiplus
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file IronPdf/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish Cloud to Maven Central Repository
run: mvn deploy -DskipTests --batch-mode --activate-profiles release --no-transfer-progress --file IronPdf-Cloud/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload JARs to GitHub Release
uses: AButler/[email protected]
with:
files: 'IronPdf/target/*.jar;IronPdf-Cloud/target/*.jar;'
repo-token: ${{ secrets.GITHUB_TOKEN }}
publish-ironpdf-engine-pack:
needs: publish-ironpdf
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Replace linux-x64 version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' ironpdf-engine-pack/ironpdf-engine-linux-x64/pom.xml
- name: Replace windows-x64 version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' ironpdf-engine-pack/ironpdf-engine-windows-x64/pom.xml
- name: Replace windows-x86 version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' ironpdf-engine-pack/ironpdf-engine-windows-x86/pom.xml
- name: Replace macos-arm64 version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' ironpdf-engine-pack/ironpdf-engine-macos-arm64/pom.xml
- name: Replace macos-x64 version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' ironpdf-engine-pack/ironpdf-engine-macos-x64/pom.xml
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish linux-x64 to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file ironpdf-engine-pack/ironpdf-engine-linux-x64/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish windows-x64 to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file ironpdf-engine-pack/ironpdf-engine-windows-x64/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish windows-x86 to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file ironpdf-engine-pack/ironpdf-engine-windows-x86/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish macos-arm64 to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file ironpdf-engine-pack/ironpdf-engine-macos-arm64/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish macos-x64 to Maven Central Repository
run: mvn deploy --batch-mode --activate-profiles release --no-transfer-progress --file ironpdf-engine-pack/ironpdf-engine-macos-x64/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
publish-javadoc-from-java11:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '11'
- name: Replace version with release tag
run: |
sed -i 's/please-replace-version/${{ github.event.release.tag_name }}/g' IronPdf/pom.xml
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build Java doc .jar
run: mvn compile javadoc:jar -Pjavadoc-java11 --file IronPdf/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME2 }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD2 }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload JARs to GitHub Release
uses: AButler/[email protected]
with:
files: 'IronPdf/target/*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}