Skip to content

chore: update env selection logic (#161) #80

chore: update env selection logic (#161)

chore: update env selection logic (#161) #80

name: release-please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
release_sha: ${{ steps.release.outputs.sha }}
steps:
- id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
# We need to include this action here instead of in another workflow since
# workflows aren't triggered by other workflows.
publish:
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
name: Publish new version to Godot Asset Store
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Replace placeholders in asset template
run: |
sed -i 's/{{ context.release.tag_name }}/${{ needs.release-please.outputs.tag_name }}/g' .asset-template.json
sed -i 's/{{ env.GITHUB_SHA }}/${{ needs.release-please.outputs.release_sha }}/g' .asset-template.json
- name: Godot Asset Lib
uses: deep-entertainment/[email protected]
with:
action: addEdit
username: ${{ secrets.GODOT_ASSET_LIBRARY_USERNAME }}
password: ${{ secrets.GODOT_ASSET_LIBRARY_PASSWORD }}
assetId: 1881
assetTemplate: .asset-template.json
baseUrl: https://godotengine.org/asset-library/api