Skip to content

Commit 07b0ea1

Browse files
committed
Migrate to creating GitHub Releases using the official CLI
The `actions/create-release` action is no longer maintained. Also migrate to workflow specific-tokens instead of an access token stored in Secrets
1 parent 936efae commit 07b0ea1

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/release.yml

+11-19
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77

88
jobs:
99
release:
10+
# needed to be able to create a Release
11+
permissions:
12+
contents: write
1013
# We need to use an old runner for Xcode 11.7
1114
runs-on: macos-11
1215
steps:
@@ -36,24 +39,13 @@ jobs:
3639
DEVELOPER_DIR=/Applications/Xcode_11.7.app/Contents/Developer make clean package FINALPACKAGE=1
3740
cd packages
3841
zip -yr9 Orion_${{ steps.setup.outputs.version }}.zip *
39-
cd ..
4042
- name: Create Release
41-
id: create_release
42-
uses: actions/create-release@v1
4343
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
with:
46-
tag_name: ${{ github.ref }}
47-
release_name: ${{ steps.setup.outputs.version }}
48-
body: ''
49-
draft: true
50-
prerelease: false
51-
- name: Upload Release
52-
uses: actions/upload-release-asset@v1
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
with:
56-
upload_url: ${{ steps.create_release.outputs.upload_url }}
57-
asset_path: ${{ github.workspace }}/orion/packages/Orion_${{ steps.setup.outputs.version }}.zip
58-
asset_name: Orion_${{ steps.setup.outputs.version }}.zip
59-
asset_content_type: application/zip
44+
GH_TOKEN: ${{ github.token }}
45+
run: |
46+
gh release create ${{ github.ref_name }} \
47+
--verify-tag \
48+
--draft \
49+
--repo ${{ github.repository }} \
50+
--title '${{ steps.setup.outputs.version }}' \
51+
orion/packages/Orion_${{ steps.setup.outputs.version }}.zip

0 commit comments

Comments
 (0)