release-build run & uses key syntax error fixed

This commit is contained in:
Kingkor Roy Tirtho 2022-04-26 18:05:42 +06:00
parent 28728f7c09
commit 82eefecf6b

View File

@ -22,16 +22,16 @@ jobs:
RELEASE_VERSION: ${{ github.event.release.tag_name }} RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Replace Version in files - 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/" 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/tools/VERIFICATION.txt
sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/spotube.nuspec sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/spotube.nuspec
- name: Build Windows Executable - name: Build Windows Executable
uses: subosito/flutter-action@v2.2.0 - uses: subosito/flutter-action@v2.2.0
with: with:
cache: true cache: true
run: | - run: |
choco install sed make -y choco install sed make -y
flutter config --enable-windows-desktop flutter config --enable-windows-desktop
flutter pub get flutter pub get
@ -42,32 +42,32 @@ jobs:
- name: Create Chocolatey Package - name: Create Chocolatey Package
# setting the sha256 hash for new bundle # 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 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 sed -i "s/%{{WIN_SHA256}}%/$HASH/" choco-struct/tools/VERIFICATION.txt
make VERSION=$RELEASE_VERSION choco make VERSION=$RELEASE_VERSION choco
- name: Rename the artifacts - 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.nupkg -NewName Spotube-windows-x86_64.nupkg
Rename-Item -Path dist/$RELEASE_VERSION/spotube-$RELEASE_VERSION-windows.exe Spotube-windows-x86_64-setup.exe Rename-Item -Path dist/$RELEASE_VERSION/spotube-$RELEASE_VERSION-windows.exe Spotube-windows-x86_64-setup.exe
- name: Upload release binary - name: Upload release binary
uses: meeDamian/github-release@2.0 - uses: meeDamian/github-release@2.0
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }} tag: ${{ github.event.release.tag_name }}
files: dist/$RELEASE_VERSION files: dist/$RELEASE_VERSION
- name: Publish to Chocolatey Repository - name: Publish to Chocolatey Repository
run: | - run: |
choco apikey -k ${{ secrets.CHOCO_API_KEY }} -s https://push.chocolatey.org/ choco apikey -k ${{ secrets.CHOCO_API_KEY }} -s https://push.chocolatey.org/
echo 'published to community.chocolatey.org' echo 'published to community.chocolatey.org'
# choco push dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg # choco push dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Spotube-Windows-Bundle name: Spotube-Windows-Bundle
path: dist/$RELEASE_VERSION path: dist/$RELEASE_VERSION