Skip to content

Commit

Permalink
Upload RPMs
Browse files Browse the repository at this point in the history
  • Loading branch information
acogoluegnes committed Nov 28, 2023
1 parent c29cb0e commit 08fbe91
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gen-deb-erlang-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
action: delete
do_delete: true
version_filter: 1:${{ inputs.erlang_major }}*
keep_last_n: 1
keep_last_n: 2
keep_last_minor_patches: true
- name: Push packages to Cloudsmith
uses: docker://pivotalrabbitmq/cloudsmith-action:latest
Expand Down
80 changes: 41 additions & 39 deletions .github/workflows/rpm-erlang-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,54 +32,56 @@ jobs:
repository: rabbitmq/erlang-rpm
ref: erlang-${{ env.ERLANG_MAJOR }}
path: 'package-sources'
# - name: Import GPG key
# uses: crazy-max/ghaction-import-gpg@v6
# with:
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
# - name: Build package
# run: ci/erlang/rpm/build-package.sh
# env:
# SIGNING_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
# - name: List generated packages
# run: |
# ls -alh packages
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Build package
run: ci/erlang/rpm/build-package.sh
env:
SIGNING_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
- name: List generated packages
run: |
ls -alh packages
- name: Delete latest versions on Cloudsmith
uses: docker://pivotalrabbitmq/cloudsmith-action:latest
with:
username: ${{ secrets.CLOUDSMITH_USERNAME }}
organization: ${{ secrets.CLOUDSMITH_ORGANIZATION }}
repository: rabbitmq-erlang-test
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
action: delete
do_delete: true
version_filter: '${{ inputs.erlang_major }}.*'
name: '^erlang*'
keep_last_n: 2
keep_last_minor_patches: true
- name: Push packages to Cloudsmith
uses: docker://pivotalrabbitmq/cloudsmith-action:latest
with:
username: ${{ secrets.CLOUDSMITH_USERNAME }}
organization: ${{ secrets.CLOUDSMITH_ORGANIZATION }}
repository: rabbitmq-erlang-test
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
distribution: ${{ inputs.distribution_name }}/${{ inputs.distribution_codename }}
action: upload
republish: true
name: '^erlang*'
local_path: packages
globs: 'erlang-*.${{ inputs.distribution_name }}/${{ inputs.distribution_codename }}*.rpm'
tags: erlang,erlang-${{ inputs.erlang_major }}.x
- name: Extract version
run: |
version=$(grep "^OTP_RELEASE" < package-sources/Makefile | cut -d "=" -f 2)
echo $version
echo "erlang_version=$version" >> $GITHUB_ENV
- name: Download el8 packages
run: |
mkdir packages-el-8
cd packages-el-8
wget "https://github.com/rabbitmq/erlang-rpm/releases/download/v$erlang_version/erlang-$erlang_version-1.el8.x86_64.rpm"
wget "https://github.com/rabbitmq/erlang-rpm/releases/download/v$erlang_version/erlang-debuginfo-$erlang_version-1.el8.x86_64.rpm"
- name: Push to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: packages-el-8/*
name: ${{ env.erlang_version }}-test
tag_name: v${{ env.tag_name }}-test
target_commitish: erlang-${{ env.ERLANG_MAJOR }}
token: ${{ secrets.CI_GITHUB_TOKEN }}
repository: rabbitmq/erlang-rpm
body: >-
Zero dependency Erlang/OTP ${{ env.erlang_version }} packages
for modern RHEL, Fedora, CentOS, and Rocky Linux releases,
suitable for running RabbitMQ.
- name: Download el9 packages
run: |
mkdir packages-el-9
cd packages-el-9
wget "https://github.com/rabbitmq/erlang-rpm/releases/download/v$erlang_version/erlang-$erlang_version-1.el9.x86_64.rpm"
wget "https://github.com/rabbitmq/erlang-rpm/releases/download/v$erlang_version/erlang-debuginfo-$erlang_version-1.el9.x86_64.rpm"
- name: Push to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: packages-el-9/*
files: packages/*
name: ${{ env.erlang_version }}-test
tag_name: v${{ env.tag_name }}-test
tag_name: v${{ env.erlang_version }}-test
target_commitish: erlang-${{ env.ERLANG_MAJOR }}
token: ${{ secrets.CI_GITHUB_TOKEN }}
repository: rabbitmq/erlang-rpm
Expand Down

0 comments on commit 08fbe91

Please sign in to comment.