mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
fix github-upload
This commit is contained in:
@@ -203,21 +203,28 @@ jobs:
|
|||||||
# fetch the whole repo for `git describe` to work
|
# fetch the whole repo for `git describe` to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: "Check if CI or Release"
|
||||||
|
run: |
|
||||||
|
releasetype=$(make releasetype)
|
||||||
|
echo "Release Type: $releasetype"
|
||||||
|
echo "RELEASETYPE=$releasetype" >> $GITHUB_OUTPUT
|
||||||
|
id: releasetype
|
||||||
|
|
||||||
- name: "Read go version from go.mod"
|
- name: "Read go version from go.mod"
|
||||||
run: |
|
run: |
|
||||||
echo "GOVER=$(sed -n 's/^go \(.*\)/\1/p' go.mod)" >> $GITHUB_OUTPUT
|
echo "GOVER=$(sed -n 's/^go \(.*\)/\1/p' go.mod)" >> $GITHUB_OUTPUT
|
||||||
id: goversion
|
id: goversion
|
||||||
|
|
||||||
- name: "Get aptly version"
|
|
||||||
run: |
|
|
||||||
echo "VERSION=$(make version)" >> $GITHUB_OUTPUT
|
|
||||||
id: releaseversion
|
|
||||||
|
|
||||||
- name: "Setup Go"
|
- name: "Setup Go"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ steps.goversion.outputs.GOVER }}
|
go-version: ${{ steps.goversion.outputs.GOVER }}
|
||||||
|
|
||||||
|
- name: "Get aptly version"
|
||||||
|
run: |
|
||||||
|
echo "VERSION=$(make version)" >> $GITHUB_OUTPUT
|
||||||
|
id: releaseversion
|
||||||
|
|
||||||
- name: "Build aptly ${{ matrix.goos }}/${{ matrix.goarch }}"
|
- name: "Build aptly ${{ matrix.goos }}/${{ matrix.goarch }}"
|
||||||
env:
|
env:
|
||||||
GOBIN: /usr/local/bin
|
GOBIN: /usr/local/bin
|
||||||
@@ -225,6 +232,7 @@ jobs:
|
|||||||
make binaries GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }}
|
make binaries GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: steps.releasetype.outputs.RELEASETYPE == 'release' && github.ref == 'refs/heads/master'
|
||||||
with:
|
with:
|
||||||
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
path: build/aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
path: build/aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||||
@@ -235,13 +243,28 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
needs: ci-binary-build
|
needs: ci-binary-build
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download Artifacts
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# fetch the whole repo for `git describe` to work
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: "Check if CI or Release"
|
||||||
|
run: |
|
||||||
|
releasetype=$(make releasetype)
|
||||||
|
echo "Release Type: $releasetype"
|
||||||
|
echo "RELEASETYPE=$releasetype" >> $GITHUB_OUTPUT
|
||||||
|
id: releasetype
|
||||||
|
|
||||||
|
- name: "Download Artifacts"
|
||||||
|
if: steps.releasetype.outputs.RELEASETYPE == 'release' && github.ref == 'refs/heads/master'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: out/
|
path: out/
|
||||||
- name: Release
|
|
||||||
|
- name: "Release"
|
||||||
|
if: steps.releasetype.outputs.RELEASETYPE == 'release' && github.ref == 'refs/heads/master'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: "out/**/aptly_*.zip"
|
files: "out/**/aptly_*.zip"
|
||||||
|
|||||||
Reference in New Issue
Block a user