Skip to content

Commit

Permalink
Merge pull request #52 from LemurPwned/package-build-update
Browse files Browse the repository at this point in the history
release creation
  • Loading branch information
LemurPwned authored Jan 5, 2024
2 parents 4b71b36 + 413e83f commit dc2c731
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# This is a basic workflow to help you get started with Actions

name: Python Package Publication

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
release-version:
Expand Down Expand Up @@ -77,16 +74,12 @@ jobs:
needs: [ linux-build, other-os-build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: "package-release.zip"
exclusions: '*.git* __pycache__/* .editorconfig build/* .eggs/*'
- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "package-release.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release-version }}
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release-version }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes
26 changes: 26 additions & 0 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

name: Release the archive

on:
workflow_dispatch:
inputs:
release-version:
required: true

permissions:
contents: write

jobs:
release:
name: Release pushed tag
runs-on: ubuntu-latest
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release-version }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes

0 comments on commit dc2c731

Please sign in to comment.