Skip to content

chore(deps): update dependency windows to v2025 #530

chore(deps): update dependency windows to v2025

chore(deps): update dependency windows to v2025 #530

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
permissions:
contents: read
strategy:
matrix:
os: [windows-2022, windows-11-arm]
runs-on: ${{ matrix.os }}
env:
arch: ${{ matrix.os == 'windows-2022' && 'x64' || (matrix.os == 'windows-11-arm' && 'arm64' || 'unknown') }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests
run: task test
- name: Build SyncTrayzor (Portable)
run: task build-portable
- name: Upload portable dist
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SyncTrayzorPortable-${{ env.arch }}.zip
path: ./release/SyncTrayzorPortable-${{ env.arch }}.zip
- name: Build SyncTrayzor Installer
run: task build-installer
- name: Upload installer dist
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SyncTrayzorSetup-${{ env.arch }}.exe
path: ./release/SyncTrayzorSetup-${{ env.arch }}.exe
release:
if: github.ref_type == 'tag'
needs: build
runs-on: windows-2025
permissions:
contents: write
discussions: write
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
path: "${{ github.workspace }}/release"
merge-multiple: true
- name: Install .NET Core
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Write private key to file
run: |
cat << EOF > synctrayzor_private_key.asc
${{ secrets.SYNCTRAYZOR_PRIVATE_KEY }}
EOF
shell: bash
- name: Sign artifacts
run: task sign-release
env:
SYNCTRAYZOR_PRIVATE_KEY: "${{ github.workspace }}\\synctrayzor_private_key.asc"
SYNCTRAYZOR_PRIVATE_KEY_PASSPHRASE: "${{ secrets.SYNCTRAYZOR_PRIVATE_KEY_PASSPHRASE }}"
- name: Upload signature file
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: sha512sum.txt.asc
path: release/sha512sum.txt.asc
- name: Get version from tag
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2
with:
validation_level: warn
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create GitHub Release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
with:
files: |
release/**
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
discussion_category_name: "Releases"
preserve_order: true
fail_on_unmatched_files: true
append_body: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Chocolatey Extensions
run: choco install chocolatey-community-validation.extension -y
shell: powershell
- name: Build Chocolatey Package
run: task build-choco-package
env:
SYNCTRAYZOR_VERSION: ${{ steps.changelog_reader.outputs.version }}
SYNCTRAYZOR_RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
- name: Upload choco package
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
path: ./release/synctrayzor*.nupkg
- name: Push Chocolatey Package
if: steps.changelog_reader.outputs.status != 'prereleased' && steps.changelog_reader.outputs.status != 'unreleased'
run: |
$packagePath = Get-ChildItem "${{ github.workspace }}/release" -Filter "synctrayzor*.nupkg" | Select-Object -ExpandProperty FullName
choco apikey --key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
choco push $packagePath --source https://push.chocolatey.org/
shell: powershell
- name: Publish to winget
uses: vedantmgoyal9/winget-releaser@7bd472be23763def6e16bd06cc8b1cdfab0e2fd5 # main
with:
identifier: GermanCoding.SyncTrayzor
installers-regex: '-x64\.exe$'
max-versions-to-keep: 5 # keep only latest 5 versions
token: ${{ secrets.WINGET_TOKEN }}