From 82eefecf6bb623eaa554c96d1f0efa21672ced46 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 26 Apr 2022 18:05:42 +0600 Subject: [PATCH] release-build run & uses key syntax error fixed --- .github/workflows/release-build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index f41924a9..83ca9d65 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -22,16 +22,16 @@ jobs: RELEASE_VERSION: ${{ github.event.release.tag_name }} - name: Replace Version in files - run: | + - run: | sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" windows/runner/Runner.rc sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/tools/VERIFICATION.txt sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/spotube.nuspec - name: Build Windows Executable - uses: subosito/flutter-action@v2.2.0 + - uses: subosito/flutter-action@v2.2.0 with: cache: true - run: | + - run: | choco install sed make -y flutter config --enable-windows-desktop flutter pub get @@ -42,32 +42,32 @@ jobs: - name: Create Chocolatey Package # setting the sha256 hash for new bundle - run: | + - run: | Set-Variable -Name HASH -Value (Get-FileHash dist\$RELEASE_VERSION\spotube-$RELEASE_VERSION-windows.exe).Hash sed -i "s/%{{WIN_SHA256}}%/$HASH/" choco-struct/tools/VERIFICATION.txt make VERSION=$RELEASE_VERSION choco - name: Rename the artifacts - run: | + - run: | Rename-Item -Path dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg -NewName Spotube-windows-x86_64.nupkg Rename-Item -Path dist/$RELEASE_VERSION/spotube-$RELEASE_VERSION-windows.exe Spotube-windows-x86_64-setup.exe - name: Upload release binary - uses: meeDamian/github-release@2.0 + - uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.event.release.tag_name }} files: dist/$RELEASE_VERSION - name: Publish to Chocolatey Repository - run: | + - run: | choco apikey -k ${{ secrets.CHOCO_API_KEY }} -s https://push.chocolatey.org/ echo 'published to community.chocolatey.org' # choco push dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg - name: Upload artifacts - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 with: name: Spotube-Windows-Bundle path: dist/$RELEASE_VERSION