diff --git a/.github/workflows/go_release.yml b/.github/workflows/go_release.yml index d54b35d63..f96694fba 100644 --- a/.github/workflows/go_release.yml +++ b/.github/workflows/go_release.yml @@ -5,8 +5,8 @@ on: types: [published] jobs: - build: - name: build + release: + name: release runs-on: ubuntu-latest steps: @@ -28,22 +28,13 @@ jobs: # builds the binary and the .deb run: make deb - release: - name: release - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Publish release to aptly env: APTLY_USER: ${{ secrets.APTLY_USER }} APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: | - ./deb-package/upload-artifacts.sh deb-package/dist/ + ./deb-package/upload-artifacts.sh deb-package/dist - name: Update artifacts to Github's release uses: softprops/action-gh-release@v1 diff --git a/deb-package/upload-artifacts.sh b/deb-package/upload-artifacts.sh index 3ab342d91..7d601faea 100755 --- a/deb-package/upload-artifacts.sh +++ b/deb-package/upload-artifacts.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This script uploads .deb packages, creates a snapshot and publish a new # version. It expects as input the folder containing the *.deb files. @@ -32,12 +32,15 @@ gpg_passphrase="$GPG_PASSPHRASE" # will be passed over the network, use TLS ! aptly_api="https://aptly-api.dedis.ch" gitversion=$(git describe --abbrev=0 --tags) -version=${gitversion:1} +version="${gitversion:1}" aptly_repository=dvoting-release aptly_snapshot=dvoting-$version aptly_published=s3:apt.dedis.ch:/squeeze +echo "getting packages from $packages:" +ls $packages + echo "Check if snapshot $aptly_snapshot already exists" res=$(curl -s -u $aptly_user:$aptly_password -o /dev/null -w "%{http_code}" ${aptly_api}/api/snapshots/$aptly_snapshot)