Skip to content

Commit

Permalink
use pip3, upload pkg file to release
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Dec 4, 2020
1 parent 6f50688 commit 7f604f5
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/build-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
build-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2

- name: Get the version number for the packages
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
fpm_args: "etc"
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS config repository package for EESSI.'"

- name: Find filenames of downloaded packages
- name: Find filenames of generated packages
id: find_filenames
shell: bash
run: |
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
run: ln -s inventory/group_vars

- name: Install Ansible
run: pip install ansible
run: pip3 install ansible

- name: Prepare package source
run: ansible-playbook --connection=local ./prepare-client-packages.yml
Expand All @@ -114,7 +115,7 @@ jobs:
- name: Build package
run: "fpm --debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t osxpkg -a all -s dir -C ./package --description 'CVMFS config repository package for EESSI.' etc"

- name: Find filename of package
- name: Find filename of generated package
id: find_filenames
shell: bash
run: |
Expand Down Expand Up @@ -142,14 +143,21 @@ jobs:
with:
name: RPM package

- name: Download macOS package
uses: actions/download-artifact@v2
with:
name: macOS package

- name: Find filenames of downloaded packages
id: find_filenames
shell: bash
run: |
rpmfile="$(ls -1 *.rpm)"
debfile="$(ls -1 *.deb)"
pkgfile="$(ls -1 *.pkg)"
echo ::set-output name=rpmfile::${rpmfile}
echo ::set-output name=debfile::${debfile}
echo ::set-output name=pkgfile::${pkgfile}
- name: Create Release
id: create_release
Expand Down Expand Up @@ -180,4 +188,14 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.find_filenames.outputs.debfile }}
asset_name: ${{ steps.find_filenames.outputs.debfile }}
asset_content_type: application/x-debian-package
asset_content_type: application/x-deb

- name: Upload Pkg as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.find_filenames.outputs.pkgfile }}
asset_name: ${{ steps.find_filenames.outputs.pkgfile }}
asset_content_type: application/x-newton-compatible-pkg

0 comments on commit 7f604f5

Please sign in to comment.