Skip to content

Commit

Permalink
Edit GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Asthowen committed Oct 15, 2022
1 parent 52e3658 commit 9a86dfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/generate-debian-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
generate-debian-package:
name: Generate Debian package and publish to APT repository
Expand All @@ -24,20 +27,12 @@ jobs:
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}

- name: Get release
id: get_release
uses: leahlundqvist/[email protected]
with:
tag_name: ${{ steps.generate_debian_package.outputs.MODULE_VERSION }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload Debian Package to releases
uses: actions/[email protected]
uses: Asthowen/UploadReleaseAsset@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
release_tag: ${{ steps.generate_debian_package.outputs.MODULE_VERSION }}
asset_path: ./deb_dist/python3-alphacodersdownloader_${{ steps.generate_debian_package.outputs.MODULE_VERSION }}-1_all.deb
asset_name: alphacoders-downloader_${{ steps.generate_debian_package.outputs.MODULE_VERSION }}-1_all.deb
asset_content_type: application/octet-stream
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/generate-rpm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
generate-rpm-package:
name: Generate RPM package and publish to RPM repository
Expand All @@ -25,21 +28,12 @@ jobs:
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}

- name: Get release
id: get_release
uses: leahlundqvist/[email protected]
with:
tag_name: ${{ steps.generate_rpm_package.outputs.MODULE_VERSION }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload RPM Package to releases
id: upload_rpm_package
uses: actions/[email protected]
uses: Asthowen/UploadReleaseAsset@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
release_tag: ${{ steps.generate_rpm_package.outputs.MODULE_VERSION }}
asset_path: ./dist/AlphacodersDownloader-${{ steps.generate_rpm_package.outputs.MODULE_VERSION }}-1.noarch.rpm
asset_name: AlphacodersDownloader-${{ steps.generate_rpm_package.outputs.MODULE_VERSION }}-1.noarch.rpm
asset_content_type: application/octet-stream
Expand Down

0 comments on commit 9a86dfb

Please sign in to comment.