From b24eedc5d9c6fc1c6c9153ebbfb41f4773d798b2 Mon Sep 17 00:00:00 2001 From: LibSSL <133518725+KernelDotDLL@users.noreply.github.com> Date: Sun, 15 Feb 2026 23:40:49 +0330 Subject: [PATCH 1/3] Update go.yml --- .github/workflows/go.yml | 48 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d410440..254c1be 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,9 +1,10 @@ - -name: Go +name: Go Build and Release on: push: branches: [ "main" ] + tags: + - 'v*' # Trigger workflow on tags like v1.0, v1.2.3, etc. pull_request: branches: [ "main" ] @@ -13,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - go-version: ['1.20'] + go-version: ['1.25'] steps: - uses: actions/checkout@v4 @@ -24,7 +25,46 @@ jobs: go-version: ${{ matrix.go-version }} - name: Build - run: go build -v ./... + run: | + echo "Building project for ${{ matrix.os }}" + if [ "${{ matrix.os }}" == "windows-latest" ]; then + go build -o nm-decryptor.exe ./... + else + go build -o nm-decryptor ./... + fi - name: Test run: go test -v ./... + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: nm-decryptor-${{ matrix.os }} + path: | + nm-decryptor* + + release: + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v4 + + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: release + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Release Assets + uses: softprops/action-gh-release@v1 + with: + files: release/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1194a4948e172b9ec475ba5c9ca85c67eae911b9 Mon Sep 17 00:00:00 2001 From: LibSSL <133518725+KernelDotDLL@users.noreply.github.com> Date: Sun, 15 Feb 2026 23:46:29 +0330 Subject: [PATCH 2/3] Update go.yml --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 254c1be..9e7d2aa 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -4,7 +4,7 @@ on: push: branches: [ "main" ] tags: - - 'v*' # Trigger workflow on tags like v1.0, v1.2.3, etc. + - 'v*' pull_request: branches: [ "main" ] @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v4 - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: release From 375092aa2531e5b3549f8c0e5c0e8eefc22ff589 Mon Sep 17 00:00:00 2001 From: LibSSL <133518725+KernelDotDLL@users.noreply.github.com> Date: Sun, 15 Feb 2026 23:50:24 +0330 Subject: [PATCH 3/3] Update go.yml --- .github/workflows/go.yml | 77 +++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9e7d2aa..9fcf24c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,54 +17,51 @@ jobs: go-version: ['1.25'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: ${{ matrix.go-version }} + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} - - name: Build - run: | - echo "Building project for ${{ matrix.os }}" - if [ "${{ matrix.os }}" == "windows-latest" ]; then - go build -o nm-decryptor.exe ./... - else - go build -o nm-decryptor ./... - fi + - name: Build + shell: bash + run: | + echo "Building project for ${{ matrix.os }}" + if [ "${{ matrix.os }}" == "windows-latest" ]; then + go build -o nm-decryptor.exe ./... + else + go build -o nm-decryptor ./... + fi - - name: Test - run: go test -v ./... + - name: Test + run: go test -v ./... + + - name: Upload Artifact + uses: actions/upload-artifact@v4 # FIXED: Updated from v3 to v4 + with: + name: nm-decryptor-${{ matrix.os }} + path: | + nm-decryptor* - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: nm-decryptor-${{ matrix.os }} - path: | - nm-decryptor* - release: needs: build runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') + permissions: + contents: write steps: - - uses: actions/checkout@v4 - - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - path: release + - uses: actions/checkout@v4 - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ github.ref_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: release-assets - - name: Upload Release Assets - uses: softprops/action-gh-release@v1 - with: - files: release/* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create and Upload GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + files: release-assets/**/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}