mirror of
https://github.com/siemens-mobile-hacks/GhidraMCP.git
synced 2026-11-25 23:57:13 +00:00
Publish a GitHub Release with the extension zip for tags
Some checks failed
Build / build (push) Failing after 3m4s
Some checks failed
Build / build (push) Failing after 3m4s
Tag pushes now create (or update) a release with the packaged extension, named GhidraMCP-<tag>-ghidra<version>.zip. Actions bumped to checkout v7, setup-java v6 and upload-artifact v7 (Node 20 deprecation).
This commit is contained in:
parent
10142233e1
commit
8241933a7c
1 changed files with 27 additions and 4 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
|
@ -13,6 +13,9 @@ on:
|
|||
required: false
|
||||
default: "12.1.3"
|
||||
|
||||
permissions:
|
||||
contents: write # publish GitHub Releases for tags
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -20,10 +23,10 @@ jobs:
|
|||
GHIDRA_VERSION: ${{ github.event.inputs.ghidra_version || '12.1.3' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v6
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
|
@ -42,8 +45,28 @@ jobs:
|
|||
- name: Build and test
|
||||
run: ./build.sh -B
|
||||
|
||||
- name: Name the package
|
||||
run: |
|
||||
version="${GITHUB_REF_NAME//\//-}"
|
||||
[[ "${GITHUB_REF_TYPE}" == tag ]] || version="$(git rev-parse --short HEAD)"
|
||||
package="GhidraMCP-${version}-ghidra${GHIDRA_VERSION}.zip"
|
||||
cp target/GhidraMCP-*.zip "${package}"
|
||||
echo "PACKAGE=${package}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Upload extension
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: GhidraMCP-ghidra${{ env.GHIDRA_VERSION }}
|
||||
path: target/GhidraMCP-*.zip
|
||||
path: ${{ env.PACKAGE }}
|
||||
|
||||
- name: Publish release
|
||||
if: github.ref_type == 'tag'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if gh release view "${GITHUB_REF_NAME}" > /dev/null 2>&1; then
|
||||
gh release upload "${GITHUB_REF_NAME}" "${PACKAGE}" --clobber
|
||||
else
|
||||
gh release create "${GITHUB_REF_NAME}" "${PACKAGE}" \
|
||||
--title "GhidraMCP ${GITHUB_REF_NAME}" --generate-notes
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue