Skip to content

Commit 37f0623

Browse files
committed
CI: Misc fixes
- Avoid duplicate runs when creating a tag - Switch to manual releases
1 parent 3e0508d commit 37f0623

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Java CI
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
workflow_dispatch:
8+
release:
9+
types: [published]
10+
11+
permissions:
12+
contents: write
413

514
jobs:
615
build-natives:
@@ -97,25 +106,22 @@ jobs:
97106
path: dist/*.zip
98107

99108
release:
100-
runs-on: "ubuntu-latest"
101-
needs: build-extension
109+
runs-on: "ubuntu-latest"
110+
needs: build-extension
111+
if: github.event_name == 'release'
102112

103-
steps:
104-
- name: Get current date
105-
id: date
106-
run: echo "::set-output name=date::$(date +'%Y%m%d')"
107-
108-
- name: Download binaries
109-
uses: actions/download-artifact@v4
110-
with:
113+
steps:
114+
- name: Download binaries
115+
uses: actions/download-artifact@v4
116+
with:
111117
pattern: firmware_utils_ghidra_*
112118
path: dist/
113119
merge-multiple: true
114120

115-
- name: Release
116-
if: github.ref == 'refs/heads/main'
117-
uses: marvinpinto/action-automatic-releases@v1.2.1
118-
with:
119-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
120-
title: "${{steps.date.outputs.date}}.0"
121-
files: dist/*.zip
121+
- name: Upload to Releases
122+
uses: svenstaro/upload-release-action@v2
123+
with:
124+
repo_token: ${{ secrets.GITHUB_TOKEN }}
125+
file: dist/*.zip
126+
tag: ${{ github.ref }}
127+
file_glob: true

0 commit comments

Comments
 (0)