fix: update release macos actions
This commit is contained in:
parent
1abef5de36
commit
851ae8f77c
|
@ -1,9 +1,8 @@
|
||||||
name: Release macOS App
|
name: Release macOS App
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags:
|
types: [ published ]
|
||||||
- 'v*.*.*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -12,12 +11,12 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
# - darwin/amd64
|
- darwin/amd64
|
||||||
# - darwin/arm64
|
# - darwin/arm64
|
||||||
- darwin/universal
|
# - darwin/universal
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Normalise platform tag
|
- name: Normalise platform tag
|
||||||
id: normalise_platform
|
id: normalise_platform
|
||||||
|
@ -78,26 +77,34 @@ jobs:
|
||||||
|
|
||||||
- name: Compress macOS app
|
- name: Compress macOS app
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd build/bin && zip -r TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip TinyRDM.app
|
run: |
|
||||||
|
cd build/bin
|
||||||
|
mv tinyrdm.app "Tiny RDM.app"
|
||||||
|
zip -r TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip "Tiny RDM.app"
|
||||||
|
|
||||||
- name: Create Release
|
- name: Get latest release from API
|
||||||
id: create_release
|
id: get_upload_url
|
||||||
uses: actions/create-release@v1.1.4
|
shell: bash
|
||||||
env:
|
run: |
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" > /tmp/releases.json
|
||||||
with:
|
url=$(jq -r '.[0].upload_url' /tmp/releases.json)
|
||||||
tag_name: ${{ github.ref }}
|
echo "url=${url/%{?name,label}/}" >> "$GITHUB_OUTPUT"
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
draft: true
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload release asset
|
||||||
id: upload-release-asset
|
shell: bash
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
run: |
|
||||||
env:
|
filepath="./build/bin/TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
|
||||||
with:
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
asset_path: ./build/bin/TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip
|
|
||||||
asset_name: TinyRDM_{{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip
|
# - name: Upload artifact
|
||||||
asset_content_type: application/zip
|
# uses: actions/upload-release-asset@v1.0.2
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# ARTIFACT_NAME: TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ steps.get_upload_url.outputs.url }}
|
||||||
|
# asset_path: ./build/bin/TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip
|
||||||
|
# asset_name: ${{ env.ARTIFACT_NAME }}.zip
|
||||||
|
# asset_content_type: application/zip
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 74 KiB |
|
@ -8,7 +8,7 @@
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>{{.Name}}</string>
|
<string>{{.Name}}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.wails.{{.Name}}</string>
|
<string>com.tinycraft.{{.Name}}</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>{{.Info.ProductVersion}}</string>
|
<string>{{.Info.ProductVersion}}</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
|
|
|
@ -15,10 +15,7 @@ const i18n = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
watch(
|
const initPreferences = async () => {
|
||||||
() => dialogStore.preferencesDialogVisible,
|
|
||||||
async (visible) => {
|
|
||||||
if (visible) {
|
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
tab.value = 'general'
|
tab.value = 'general'
|
||||||
|
@ -32,6 +29,13 @@ watch(
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => dialogStore.preferencesDialogVisible,
|
||||||
|
(visible) => {
|
||||||
|
if (visible) {
|
||||||
|
nextTick().then(async () => initPreferences())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue