Skip to content

Commit

Permalink
Merge pull request #104 from FirstTimeInForever/draft-releases
Browse files Browse the repository at this point in the history
Fix draft releases
  • Loading branch information
PHPirates authored May 19, 2024
2 parents 35f80ea + 9790ae6 commit 274049b
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,32 +93,22 @@ jobs:
| xargs -I '{}' \
curl -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases/{}
# Create new release draft - which is not publicly visible and requires manual acceptance
- name: Create Release Draft
id: createDraft
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.build.outputs.version }}
release_name: v${{ needs.build.outputs.version }}
# body: ${{ needs.build.outputs.changelog }}
draft: true

# Download plugin artifact provided by the previous job
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: plugin-artifact
path: plugin-artifact

# Upload artifact as a release asset
- name: Upload Release Asset
- name: Create Release Draft
id: upload-release-asset
uses: actions/upload-release-asset@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.createDraft.outputs.upload_url }}
asset_path: ./plugin-artifact/${{ needs.build.outputs.artifact }}
asset_name: ${{ needs.build.outputs.artifact }}
asset_content_type: application/zip
files: ./plugin-artifact/${{ needs.build.outputs.artifact }}
fail_on_unmatched_files: true
draft: true
name: v${{ needs.build.outputs.version }}
tag_name: v${{ needs.build.outputs.version }}

0 comments on commit 274049b

Please sign in to comment.