-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (54 loc) · 2.46 KB
/
maven_deploy.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
# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
name: netbeans-nbm-deploy
on:
workflow_dispatch:
jobs:
build:
environment: RELEASE180
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
- name : get version
run: echo "::set-output name=version::$(grep 'OpenIDE-Module-Specification-Version' ./manifest.mf | cut -d':' -f 2-)"
id: nbm_version
- name: view version
run: echo ${{ steps.nbm_version.outputs.version }}
- name : prepare the files from project
run : mkdir -p nb-plugin-package/src/main/java
- name : prepare the files from project
run : mkdir -p nb-plugin-package/src/main/nbm
- name : prepare the files from project
run : mkdir -p nb-plugin-package/src/main/resources/org/netbeans/modules/php/blade
- name : prepare the files from project
run : cp -rf ./src/org nb-plugin-package/src/main/java
- name : prepare the files from project
run : cp -rf ./src/org/netbeans/modules/php/blade/resources nb-plugin-package/src/main/resources/org/netbeans/modules/php/blade
- name : prepare the files from project
run : cp ./manifest.mf nb-plugin-package/src/main/nbm/manifest.mf
- name : prepare the files from project
run : cp ./.github/deploy/pom.xml nb-plugin-package/pom.xml
- name : prepare the files from project
run : cp ./nbproject/project.properties nb-plugin-package/project.properties
- name : prepare the files from project
run : cp ./LICENSE nb-plugin-package/LICENSE
env:
GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name : Publish package
working-directory: ./nb-plugin-package
run : mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}