Skip to content

Commit

Permalink
Update release-windows-dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
louanfontenele authored Dec 29, 2024
1 parent 9ccd2fc commit 98d3fc6
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/release-windows-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
workflow_dispatch: # Permite execução manual
workflow_dispatch: # Allows manual execution

jobs:
release:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Pega todas as tags existentes
fetch-depth: 0 # Fetch all existing tags

- name: Setup .NET
uses: actions/setup-dotnet@v3
Expand All @@ -32,6 +32,34 @@ jobs:
- name: Create Zip Archive
run: zip -r release.zip release/

# Detect changes in the .github directory
- name: Check for .github changes
id: changes
run: |
if git diff --name-only HEAD^ | grep '^\.github/'; then
echo "changes_in_github=true" >> $GITHUB_ENV
else
echo "changes_in_github=false" >> $GITHUB_ENV
fi
# Apply label if changes are detected in .github
- name: Label PR with ignore-changelog
if: env.changes_in_github == 'true' && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const pr = context.payload.pull_request;
if (pr) {
github.rest.issues.addLabels({
owner,
repo,
issue_number: pr.number,
labels: ['ignore-changelog']
});
}
- name: Generate Version Tag
id: tag
run: |
Expand Down

0 comments on commit 98d3fc6

Please sign in to comment.