Skip to content

Commit 729f098

Browse files
authored
Switch action for uploading release assets
1 parent a2776de commit 729f098

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ to attach bundles to the releases. It takes the following arguments:
4545

4646
* ``github-token``: A valid GitHub token with authorization scope to upload the file
4747
to the release
48+
* ``upload-url`` The upload URL where the release assets can be uploaded; should be
49+
that of the release
4850

4951
It can be invoked using:
5052

@@ -54,6 +56,7 @@ It can be invoked using:
5456
uses: adafruit/workflows-circuitpython-libs/release-gh@main
5557
with:
5658
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
upload-url: ${{ github.event.release.upload_url }}
5760
5861
PyPI Release CI
5962
---------------

release-gh/action.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ inputs:
88
github-token:
99
description: 'A GitHub token (required to upload to the release)'
1010
required: true
11+
upload-url:
12+
description: 'The release upload URL for the asset'
13+
required: true
1114
runs:
1215
using: "composite"
1316
steps:
@@ -45,13 +48,8 @@ runs:
4548
shell: bash
4649
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
4750
- name: Upload Release Assets
48-
# the 'official' actions version does not yet support dynamically
49-
# supplying asset names to upload. @csexton's version chosen based on
50-
# discussion in the issue below, as its the simplest to implement and
51-
# allows for selecting files with a pattern.
52-
# https://github.com/actions/upload-release-asset/issues/4
53-
#uses: actiont actionss/[email protected]
54-
uses: csexton/release-asset-action@master
51+
uses: shogo82148/actions-upload-release-asset@v1
5552
with:
56-
pattern: "bundles/*"
57-
github-token: ${{ inputs.github-token }}
53+
asset_path: "bundles/*"
54+
github_token: ${{ inputs.github-token }}
55+
upload_url: ${{ inputs.upload-url }}

0 commit comments

Comments
 (0)