-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (44 loc) · 1.59 KB
/
release-please.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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