diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0f2201f5cc..65b1c2cb4c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -86,6 +86,19 @@ jobs: SOURCE_DIR: _build/deb/apt-repo DEST_DIR: deb/dists/nightly/main/binary-all if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} + - name: Push Release file to S3 + # Send deb file to https://ksp-ckan.s3-us-west-2.amazonaws.com/ + uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks + env: + AWS_S3_BUCKET: ksp-ckan + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: us-east-1 + SOURCE_DIR: _build/deb/apt-repo-rel + DEST_DIR: deb/dists/nightly + if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} - name: Send Discord Notification env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c807892320..9fdb334d86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,6 +118,19 @@ jobs: SOURCE_DIR: _build/deb/apt-repo DEST_DIR: deb/dists/stable/main/binary-all if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} + - name: Push Release file to S3 + # Send deb file to https://ksp-ckan.s3-us-west-2.amazonaws.com/ + uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks + env: + AWS_S3_BUCKET: ksp-ckan + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: us-east-1 + SOURCE_DIR: _build/deb/apt-repo-rel + DEST_DIR: deb/dists/stable + if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }} - name: Send Discord Notification env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c131f8b7..24a06ad477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Features - [Multiple] Allow upgrading manually installed modules (#3190 by: HebaruSan; reviewed: DasSkelett) -- [Build] Generate APT repo for releases and under dev builds (#3197 by: HebaruSan; reviewed: DasSkelett) +- [Build] Generate APT repo for releases and under dev builds (#3197, #3201 by: HebaruSan; reviewed: DasSkelett) ### Bugfixes diff --git a/debian/Makefile b/debian/Makefile index fe3100735c..79778ec4d3 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -23,13 +23,17 @@ CONSOLEUIDESKTOPSRC:=ckan-consoleui.desktop CONSOLEUIDESKTOPDEST:=$(DESTDIR)/usr/share/applications/ckan-consoleui.desktop VERSION:=$(shell egrep '^\s*\#\#\s+v.*$$' $(CHANGELOGSRC) | head -1 | sed -e 's/^\s*\#\#\s\+v//' ) DEB:=../_build/deb/ckan_$(VERSION)_all.deb + APTREPO:=../_build/deb/apt-repo REPODEB:=$(APTREPO)/ckan_$(VERSION)_all.deb PACKAGES:=$(APTREPO)/Packages.gz RELEASESRC:=Release.in RELEASEDEST:=$(APTREPO)/Release -repo: $(REPODEB) $(PACKAGES) $(RELEASEDEST) +APTREPOREL:=../_build/deb/apt-repo-rel +RELRELEASEDEST:=$(APTREPOREL)/Release + +repo: $(REPODEB) $(PACKAGES) $(RELEASEDEST) $(RELRELEASEDEST) $(REPODEB): $(DEB) umask 0022 && mkdir -p $(shell dirname $@) @@ -43,6 +47,10 @@ $(RELEASEDEST): $(RELEASESRC) umask 0022 && mkdir -p $(shell dirname $@) umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@ +$(RELRELEASEDEST): $(RELEASESRC) + umask 0022 && mkdir -p $(shell dirname $@) + umask 0022 && sed -e 's/@VERSION@/$(VERSION)/' $< > $@ + $(DEB): $(EXEDEST) $(SCRIPTDEST) $(CONTROLDEST) $(CHANGELOGDEST) $(DEBCHANGEDEST) $(MANDEST) $(ICONDEST) $(COPYRIGHTDEST) $(DESKTOPDEST) $(CONSOLEUIDESKTOPDEST) umask 0022 && mkdir -p $(shell dirname $@) fakeroot dpkg-deb --build $(DESTDIR)/ $@