Skip to content

Commit

Permalink
CI: Misc fixes
Browse files Browse the repository at this point in the history
- Avoid duplicate runs when creating a tag
- Switch to manual releases
  • Loading branch information
al3xtjames committed Jan 16, 2024
1 parent 3e0508d commit 37f0623
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Java CI

on: [push, pull_request, workflow_dispatch]
on:
push:
branches: ['**']
pull_request:
workflow_dispatch:
release:
types: [published]

permissions:
contents: write

jobs:
build-natives:
Expand Down Expand Up @@ -97,25 +106,22 @@ jobs:
path: dist/*.zip

release:
runs-on: "ubuntu-latest"
needs: build-extension
runs-on: "ubuntu-latest"
needs: build-extension
if: github.event_name == 'release'

steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"

- name: Download binaries
uses: actions/download-artifact@v4
with:
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
pattern: firmware_utils_ghidra_*
path: dist/
merge-multiple: true

- name: Release
if: github.ref == 'refs/heads/main'
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: "${{steps.date.outputs.date}}.0"
files: dist/*.zip
- name: Upload to Releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true

0 comments on commit 37f0623

Please sign in to comment.