Skip to content

Commit

Permalink
cd: publish deb artifacts
Browse files Browse the repository at this point in the history
Publish deb artifacts on tag.

To test, comment "run only on tags" condition, change RWS_REPO
to https://rws-dev.tarantool.org.

See [1] about OS support.

1. #257

Closes #198
  • Loading branch information
DifferentialOrange committed Nov 8, 2022
1 parent aadc4ce commit e007db1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/packing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,48 @@ jobs:

- name: Run tests
run: make test-pure-install

publish_deb:
# if: startsWith(github.ref, 'refs/tags')
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository)
needs:
- run_tests_deb

runs-on: ubuntu-20.04

strategy:
fail-fast: false

matrix:
target:
- os: ubuntu
dist: focal # 20.04
- os: ubuntu
dist: jammy # 22.04
- os: debian
dist: buster # 10
- os: debian
dist: bullseye # 11

steps:
- name: Clone the connector repo
uses: actions/checkout@v3

- name: Install tools for package publishing
run: sudo apt install -y curl make

- name: Download pip package artifacts
uses: actions/download-artifact@v3
with:
name: deb_dist
path: deb_dist

- name: Publish artifacts
run: make deb-dist-publish
env:
RWS_REPO: https://rws-dev.tarantool.org
RWS_AUTH: ${{ secrets.RWS_AUTH }}
OS: ${{ matrix.target.os }}
DIST: ${{ matrix.target.dist }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Pack RPM artifacts with GitHub Actions (#164, #198).
- Publish RPM artifacts with GitHub Actions (#164, #198).
- Pack deb artifacts with GitHub Actions (#198).
- Publish deb artifacts with GitHub Actions (#198).

### Changed
- Bump msgpack requirement to 1.0.4 (PR #223).
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,10 @@ deb-dist:
.PHONY: deb-dist-check
deb-dist-check:
dpkg -I deb_dist/*.deb

.PHONY: deb-dist-publish
deb-dist-publish:
$(eval FILE_FLAGS := $(shell find deb_dist/ -type f -regex '.*\.deb' -or -regex '.*\.dsc' \
| xargs -I {} sh -c 'echo -F $$(basename {})=@{}' | xargs))
curl -v -LfsS -X PUT ${RWS_REPO}/release/modules/${OS}/${DIST} \
-F product=python3-tarantool $(FILE_FLAGS) -u ${RWS_AUTH}

0 comments on commit e007db1

Please sign in to comment.