From 673deb31096af02f1ab07c0dafacde6a9958e0c2 Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Fri, 28 Jun 2024 20:27:07 -0700 Subject: [PATCH] fix: github actions release flow for windows installers --- .github/workflows/release.yml | 30 ++++++------------------------ internal/orchestrator/repo/repo.go | 2 +- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb075fc7..5327124e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,33 +71,15 @@ jobs: name: release-artifacts path: dist - - name: Get Release Artifact URL # used to append installer executables to the release after GoReleaser runs - id: geturl - run: | - upload_url=$(curl -sL https://api.github.com/repos/${{github.repository}}/releases/latest?access_token=${{ secrets.GITHUB_TOKEN }} | jq -r '.upload_url') - echo ::set-output name=upload_url::$upload_url - - name: Generate Installers run: | mkdir -p dist-installers ./scripts/generate-installers.sh ./dist-installers - - name: Upload Release Asset x86_64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Assets + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') with: - upload_url: ${{ steps.geturl.outputs.upload_url }} - asset_path: ./dist-installers/Backrest-setup-x86_64.exe - asset_name: Backrest-setup-windows-x86_64.exe - asset_content_type: application/octet-stream - - - name: Upload Release Asset arm64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.geturl.outputs.upload_url }} - asset_path: ./dist-installers/Backrest-setup-arm64.exe - asset_name: Backrest-setup-windows-arm64.exe - asset_content_type: application/octet-stream + files: | + ./dist-installers/Backrest-setup-x86_64.exe + ./dist-installers/Backrest-setup-arm64.exe diff --git a/internal/orchestrator/repo/repo.go b/internal/orchestrator/repo/repo.go index cbd5539c..da00b434 100644 --- a/internal/orchestrator/repo/repo.go +++ b/internal/orchestrator/repo/repo.go @@ -124,7 +124,7 @@ func (r *RepoOrchestrator) Backup(ctx context.Context, plan *v1.Plan, progressCa defer r.mu.Unlock() if !r.initialized { - if err := r.repo.Init(ctx, restic.WithEnviron()); err != nil { + if err := r.repo.Init(ctx); err != nil { return nil, fmt.Errorf("failed to initialize repo: %w", err) } r.initialized = true