-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unmaintained actions, actions/create-release and -/upload-release-asset, were replaced with softprops/action-gh-release that combines the functionality of both.
- Loading branch information
Showing
1 changed file
with
13 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,12 @@ jobs: | |
run: make test | ||
|
||
publish: | ||
if: github.ref == 'refs/heads/master' | ||
if: github.ref == 'refs/heads/update-release-actions' | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -41,33 +43,19 @@ jobs: | |
run: | | ||
echo 'package version: ${{ steps.package.outputs.package_version }}' | ||
echo 'git revision: ${{ steps.package.outputs.git_revision }}' | ||
- id: github_release | ||
name: Create GitHub release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
name: Release v${{ steps.package.outputs.package_version }} | ||
tag_name: v${{ steps.package.outputs.package_version }} | ||
release_name: Release v${{ steps.package.outputs.package_version }} | ||
- name: Publish source distribution to Github | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.github_release.outputs.upload_url }} | ||
asset_path: dist/cfn-review-bot-${{ steps.package.outputs.package_version }}.tar.gz | ||
asset_name: cfn-review-bot-${{ steps.package.outputs.package_version }}.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Publish wheel to Github | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.github_release.outputs.upload_url }} | ||
asset_path: dist/cfn_review_bot-${{ steps.package.outputs.package_version }}-py3-none-any.whl | ||
asset_name: cfn_review_bot-${{ steps.package.outputs.package_version }}-py3-none-any.whl | ||
asset_content_type: application/zip | ||
prerelease: true | ||
files: | | ||
dist/cfn-review-bot-${{ steps.package.outputs.package_version }}.tar.gz | ||
dist/cfn_review_bot-${{ steps.package.outputs.package_version }}-py3-none-any.whl | ||
fail_on_unmatched_files: true | ||
|
||
- name: Publish packages to PyPI | ||
if: github.ref == 'refs/heads/master' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
|