Skip to content

Commit

Permalink
Use appropriate commit for push/pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Oct 25, 2024
1 parent ba25e93 commit 96aeac0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,19 @@ jobs:
verbose: true

# Produce an Alire release manifest
- name: Make Release Manifest
- name: Configure Github credentials
run: |
# Set user GitHub login required for `alr publish`
alr config --set --global user.github_login ${{github.repository_owner}}
# Run Alire publish assistant
alr publish ${{github.server_url}}/${{github.repository}} ${{github.sha}}
# Run Alire publish assistant with the appropriate commit
alr publish ${{github.server_url}}/${{github.repository}} ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- if: github.event_name == 'pull_request'
run: alr publish ${{github.server_url}}/${{github.repository}} ${{ github.event.pull_request.head.sha }}

- if: github.event_name == 'push'
run: alr publish ${{github.server_url}}/${{github.repository}} ${{ github.sha }}

# Save the path to the release manifest for the next step.
# This is a little trick to get around the fact that the actions/upload-release-asset doesn't allow globing pattern.
Expand Down

0 comments on commit 96aeac0

Please sign in to comment.