Skip to content

Commit

Permalink
Add publish addon workflow (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
zarstensen authored Dec 16, 2023
1 parent d3cf6d3 commit aaeba4a
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/publish_addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,40 @@ jobs:
publish_addon:
name: Publish Addon
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install Dependencies
run: sudo apt-get install -y zip
- name: Checkout Repo
id: checkout_repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Dependencies
run: sudo apt-get install -y zip

- name: Create Addon Folder
run: |
rsync -Rr . ./addon
zip -r GodotAnnotate.zip ./addon -x "**/.*/*"
ls -R
- name: Create Addon Folder
run: |
rsync -Rr . ./addon
zip -r GodotAnnotate.zip ./addon
- name: Retrieve Release
id: retrieve_release
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: GET /repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}

- name: Upload Asset
id: upload_asset
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ fromJson(steps.retrieve_release.outputs.data).id }}/assets?name=GodotAnnotate.zip" \
--data-binary "@GodotAnnotate.zip"
- name: Upload Asset
id: upload_asset
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ fromJson(steps.retrieve_release.outputs.data).id }}/assets?name=GodotAnnotate.zip" \
--data-binary "@./GodotAnnotate.zip"

0 comments on commit aaeba4a

Please sign in to comment.