Skip to content

v0.1.1 Publish

v0.1.1 Publish #11

Workflow file for this run

name: Godot Annotate
run-name: ${{ github.ref_name }} Publish
on:
release:
types: [published]
jobs:
publish_addon:
name: Publish Addon
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- 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: |
mkdir addons
rsync -Rr . addons/GodotAnnotate
zip -r GodotAnnotate.zip ./addons/GodotAnnotate -x "**/.*/*"
ls -R
- name: Retrieve Release
id: retrieve_release
uses: octokit/request-action@v2.x
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"