Skip to content

Commit

Permalink
Update GH workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed Oct 1, 2024
1 parent 0502c83 commit 5c40429
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ant-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ on:
release:
types: [created]

permissions:
id-token: write
attestations: write
contents: write
packages: write
checks: write

jobs:
call-workflow:
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v1
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
with:
josm-revision: "r18723"

josm-revision: "r19044"
secrets: inherit
39 changes: 35 additions & 4 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,46 @@ on:
branches:
- master
- $default-branch
schedule:
- cron: "3 23 * * 4"
workflow_dispatch:

permissions:
id-token: write
attestations: write
contents: write
packages: write
checks: write

jobs:
check-release-needed:
runs-on: ubuntu-latest
outputs:
release_needed: ${{ steps.create_release_needed.outputs.release_needed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ (github.repository == 'JOSM/austriaaddresshelper' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request') && '0' || '1' }}

- name: Set release needed
id: create_release_needed
run: |
last_tag=$(git describe --tags --abbrev=0 --always)
release_needed="false"
for file in $(git diff ${last_tag}..HEAD --name-only); do
if [[ $file = "src/"* ]] || [[ $file = "data/"* ]] || [[ $file = "lib/"* ]] || [[ $file = "resources/"* ]] || [[ $file = "images/"* ]]; then
release_needed="true"
break
fi
done
echo "release_needed=$release_needed" >> $GITHUB_OUTPUT
call-workflow:
needs: check-release-needed
strategy:
matrix:
josm-revision: ["", "r18723"]
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v1
josm-revision: ["", "r19044"]
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
with:
josm-revision: ${{ matrix.josm-revision }}
perform-revision-tagging: false
secrets: inherit

0 comments on commit 5c40429

Please sign in to comment.