mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-08-28 20:06:32 +00:00
fix: github actions release flow for windows installers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user