-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (66 loc) · 2.74 KB
/
nbm_prerelease.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
# 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-prerelease
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- 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/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
- name : package
working-directory: ./nb-plugin-package
run : mvn package
- name : upload nbm
uses: actions/upload-artifact@v4
with:
name: blade-php-nbm
path: ./nb-plugin-package/target/nbm/*.nbm
- name: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
id: create_release
with:
draft: false
prerelease: true
release_name: Netbeans Blade Php pre-release ${{ steps.nbm_version.outputs.version }}
tag_name: prenbpr1.0.3
body_path: .github/workflows/CHANGELOG_PRERELEASE.md
- name: upload nbm artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nb-plugin-package/target/nbm/php.blade-1.0.0.nbm
asset_name: php-blade180-${{ steps.nbm_version.outputs.version }}.nbm
asset_content_type: application/nbm