Skip to content

Commit

Permalink
chore: workflow, delete versionw
Browse files Browse the repository at this point in the history
  • Loading branch information
terasum committed Sep 16, 2023
1 parent 2adfc0e commit 1b33600
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/package-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
id: version
run: echo "::set-output name=tag::v-3.0.1-alpha-${GITHUB_SHA:0:6}"

- name: Get version tag (windows)
if: matrix.platform == 'windows-2019'
id: versionw
run: |
echo "::set-output name=tag::v3.0.1-alpha-temp"
# - name: Get version tag (windows)
# if: matrix.platform == 'windows-2019'
# id: versionw
# run: |
# echo "::set-output name=tag::v3.0.1-alpha-temp"

- name: Inall pnpm
uses: pnpm/action-setup@v2
Expand Down Expand Up @@ -87,15 +87,15 @@ jobs:
New-Item -ItemType directory -Path "$HOME\.wails" -Force
Copy-Item -Path "$PWD\wails.json" -Destination "$HOME\.wails\wails.json"
choco install mingw
wails build -f -ldflags "-X medict/internal/app.semver=${{ steps.versionw.outputs.tag }}"
Compress-Archive -Path "$PWD\build\bin\medict.exe" -DestinationPath "$PWD\Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip"
wails build -f -ldflags "-X medict/internal/app.semver=unknown
Compress-Archive -Path "$PWD\build\bin\medict.exe" -DestinationPath "$PWD\Medict_Windows_x86_64.zip"
- name: Upload windows zip
if: matrix.platform == 'windows-2019'
uses: actions/upload-artifact@v2
with:
name: Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip
path: Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip
name: Medict_Windows_x86_64.zip
path: Medict_Windows_x86_64.zip


# - name: Create linux app image
Expand All @@ -117,20 +117,13 @@ jobs:


release:
runs-on: ubuntu-latest
needs: package
steps:
- name: Get version tag (unix)
if: matrix.platform != 'windows-2019'
id: version
run: echo "::set-output name=tag::v-3.0.1-alpha-${GITHUB_SHA:0:6}"

- name: Get version tag (windows)
if: matrix.platform == 'windows-2019'
id: versionw
run: |
echo "::set-output name=tag::v3.0.1-alpha-temp"
- name: Get changelog url
id: changelog
run: echo "${{ steps.version.outputs.tag }}---$(date +'%Y-%m-%d')" | sed -e 's/\.//g' | awk '{print "::set-output name=url::https://github.com/terasum/medict/blob/develop/CHANGELOG.md#" $1}'
Expand Down Expand Up @@ -161,6 +154,7 @@ jobs:
asset_content_type: application/octet-stream

- name: Attach linux tar.gz
if: matrix.platform == 'windows-2019'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -171,13 +165,14 @@ jobs:
asset_content_type: application/octet-stream

- name: Attach windows zip
if: matrix.platform == 'windows-2019'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip/Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip
asset_name: Medict_${{ steps.versionw.outputs.tag }}_Windows_x86_64.zip
asset_path: Medict_Windows_x86_64.zip/Medict_Windows_x86_64.zip
asset_name: Medict_Windows_x86_64.zip
asset_content_type: application/octet-stream

# - name: Attach linux app image
Expand Down

0 comments on commit 1b33600

Please sign in to comment.