diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6595016..070a62e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - stable + #- main jobs: build: @@ -17,8 +18,7 @@ jobs: env: DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: 1 - VERSION: 1.0.0.0 - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + VERSION: 1.0.0.0 # Set the version number here steps: - name: Checkout code @@ -29,6 +29,9 @@ jobs: with: dotnet-version: ${{ matrix.dotnet-version }} + - name: Save version to GITHUB_ENV + run: echo "VERSION=${{ env.VERSION }}" >> $GITHUB_ENV + - name: Restore dependencies run: nuget restore @@ -72,10 +75,11 @@ jobs: - name: Create GitHub release for main branch if: github.ref == 'refs/heads/main' + id: create_release uses: softprops/action-gh-release@v1 with: - tag_name: build/${{env.VERSION}} - name: MiriVoice v${{env.VERSION}} Beta + tag_name: build/${{ env.VERSION }} + name: MiriVoice v${{ env.VERSION }} Beta draft: false generate_release_notes: true prerelease: true @@ -84,10 +88,11 @@ jobs: - name: Create GitHub release for stable branch if: github.ref == 'refs/heads/stable' + id: create_release uses: softprops/action-gh-release@v1 with: - tag_name: build/${{env.VERSION}} - name: MiriVoice v${{env.VERSION}} + tag_name: build/${{ env.VERSION }} + name: MiriVoice v${{ env.VERSION }} generate_release_notes: true draft: false prerelease: false diff --git a/Mirivoice.Desktop/appveyor.py b/Mirivoice.Desktop/appveyor.py index 7f16a9c..a069162 100644 --- a/Mirivoice.Desktop/appveyor.py +++ b/Mirivoice.Desktop/appveyor.py @@ -65,8 +65,6 @@ def write_info_plist(): os.system("git tag build/%s 2>&1" % (appcast_ver)) os.system("git push origin build/%s 2>&1" % (appcast_ver)) - os.system("del *.xml 2>&1") - os.system("dotnet restore Mirivoice.Desktop/Mirivoice.Desktop.csproj -r win-x86") os.system( "dotnet publish Mirivoice.Desktop/Mirivoice.Desktop.csproj -c Release -r win-x86 -o Mirivoice.Desktop/bin/win-x86 -p:AssemblyVersion=%s" % (appcast_ver)) @@ -79,9 +77,6 @@ def write_info_plist(): elif sys.platform == 'darwin': - os.system("rm *.dmg") - os.system("rm *.xml") - os.system("git checkout Mirivoice.Desktop/Mirivoice.Desktop.csproj") os.system( "sed -i '' \"s/0.0.0/%s/g\" Mirivoice.Desktop/Mirivoice.Desktop.csproj" % (appcast_ver)) @@ -96,8 +91,6 @@ def write_info_plist(): write_appcast("macos", "osx-x64", "MiriVoice-osx-x64.zip") else: - os.system("rm *.xml") - os.system("dotnet restore Mirivoice.Desktop/Mirivoice.Desktop.csproj -r linux-x64") os.system( "dotnet publish Mirivoice.Desktop/Mirivoice.Desktop.csproj -c Release -r linux-x64 -o Mirivoice.Desktop/bin/linux-x64 -p:AssemblyVersion=%s" % (appcast_ver))