diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml index bc9cedc..a14b94d 100644 --- a/.github/workflows/aur.yml +++ b/.github/workflows/aur.yml @@ -23,12 +23,13 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Generate PKGBUILD + - name: Generate PKGBUILD and .SRCINFO run: | VERSION=${{ steps.version.outputs.version }} SHA_X86=${{ steps.checksums.outputs.sha256_x86_64 }} SHA_ARM=${{ steps.checksums.outputs.sha256_aarch64 }} - cat > PKGBUILD < PKGBUILD < pkgname=copia-cli-bin pkgver=${VERSION} @@ -49,15 +50,42 @@ jobs: install -Dm755 copia-cli "\${pkgdir}/usr/bin/copia-cli" install -Dm644 LICENSE "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE" } - PKGEOF + EOF sed -i 's/^ //' PKGBUILD + cat > .SRCINFO < ~/.ssh/aur + chmod 600 ~/.ssh/aur + ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts + export GIT_SSH_COMMAND="ssh -i ~/.ssh/aur" + + git clone ssh://aur@aur.archlinux.org/copia-cli-bin.git aur-repo + cp PKGBUILD .SRCINFO aur-repo/ + cd aur-repo + git config user.name "qubernetic" + git config user.email "info@qubernetic.com" + git add PKGBUILD .SRCINFO + git commit -m "Update to ${{ steps.version.outputs.version }}" + git push diff --git a/.github/workflows/copr.yml b/.github/workflows/copr.yml index 9ee457f..1779526 100644 --- a/.github/workflows/copr.yml +++ b/.github/workflows/copr.yml @@ -30,10 +30,10 @@ jobs: - name: Build SRPM run: | VERSION=${{ steps.version.outputs.version }} - curl -sL "https://github.com/${{ github.repository }}/archive/v${VERSION}/${GITHUB_REPOSITORY##*/}-${VERSION}.tar.gz" \ + sed -i "s/^Version:.*$/Version: ${VERSION}/" rpmbuild/copia-cli.spec + curl -sL "https://github.com/${{ github.repository }}/archive/v${VERSION}/copia-cli-${VERSION}.tar.gz" \ -o rpmbuild/copia-cli-${VERSION}.tar.gz rpmbuild -bs rpmbuild/copia-cli.spec \ - --define "version ${VERSION}" \ --define "_sourcedir $(pwd)/rpmbuild" \ --define "_srcrpmdir $(pwd)/rpmbuild" diff --git a/rpmbuild/copia-cli.spec b/rpmbuild/copia-cli.spec index cccf91a..ad18053 100644 --- a/rpmbuild/copia-cli.spec +++ b/rpmbuild/copia-cli.spec @@ -1,7 +1,7 @@ %global goipath github.com/qubernetic/copia-cli Name: copia-cli -Version: %{version} +Version: 0.0.0 Release: 1%{?dist} Summary: CLI for Copia — source control for industrial automation