diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e32b21f..82cbcd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,12 @@ jobs: uses: actions/checkout@v3 with: path: reva-release + - name: Checkout reva repository + uses: actions/checkout@v3 + with: + repository: ${{ inputs.repo }}/reva + path: reva + ref: ${{ inputs.branch }} - name: Install build infrastructure run: | source /etc/os-release @@ -42,25 +48,23 @@ jobs: - name: Install golang run: | wget https://go.dev/dl/go${{ inputs.go-version }}.linux-amd64.tar.gz && tar xfz go${{ inputs.go-version }}.linux-amd64.tar.gz - - name: Checkout reva repository - uses: actions/checkout@v3 - with: - repository: ${{ inputs.repo }}/reva - path: reva - ref: ${{ inputs.branch }} - - name: Copy necessary files for building the RPMs - run: | - cp reva-release/Makefile reva/Makefile.rpm - cp reva-release/cernbox-revad.spec reva/cernbox-revad.spec - - name: Create reva RPMs + - name: Prepare files for building the RPMs id: reva-rpms + run: | + cd reva + echo revaVer="Reva commit $(git rev-parse --short HEAD) at ${{ inputs.repo }}/${{ inputs.branch }}" >> "$GITHUB_OUTPUT" + cd ../reva-release + go run prepare_release.go -author "temporary" -email "cernbox-admins@cern.ch" -reva-version "Reva commit" + echo "version=$(awk '$1 == "Version:" {print $2}' cernbox-revad.spec)" >> $GITHUB_ENV + cp Makefile ../reva/Makefile.rpm + cp cernbox-revad.spec ../reva/cernbox-revad.spec + - name: Build Reva RPMs run: | set -x export GOPATH=$(pwd)/go export PATH=$PATH:$GOPATH/bin rm -rf ~/.cache/go-build cd reva - echo revaVer="Reva commit $(git rev-parse --short HEAD) at ${{ inputs.repo }}/${{ inputs.branch }}" >> "$GITHUB_OUTPUT" make -f Makefile.rpm rpm mkdir /release mv cernbox-*.rpm /release