Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pyreleaser from scratch #17

Merged
merged 4 commits into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,37 @@ jobs:
- name: Get Current Tag
uses: WyriHaximus/github-action-get-previous-tag@master
id: tag
- name: Setup Pyhton
uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Build Python Module
uses: JackMcKew/pyinstaller-action-linux@main
with:
path: terrabutler
run: |
pip install -r requirements.txt pyinstaller
pyinstaller --clean -y --dist ./dist/linux --workpath /tmp terrabutler/terrabutler.spec
- name: Copy needed files to build directory
run: |
ls -lha
cp README.md terrabutler/dist/linux
cp README.md dist/linux
- name: Create archive of build (.tar.gz)
uses: sibiraj-s/action-archiver@v1
with:
working-directory: "./"
path: "terrabutler/dist/linux"
path: "dist/linux"
format: tar
gzip: true
output: terrabutler-${{ env.RUNNER_OS }}-${{ env.RUNNER_ARCH }}-${{ steps.tag.outputs.tag }}.tar.gz
output: terrabutler-${{ runner.os }}-${{ runner.arch }}-${{ steps.tag.outputs.tag }}.tar.gz
- name: Add artifact to Release
uses: softprops/action-gh-release@v1
with:
files: terrabutler-${{ env.RUNNER_OS }}-${{ env.RUNNER_ARCH }}-${{ steps.tag.outputs.tag }}.tar.gz
files: terrabutler-${{ runner.os }}-${{ runner.arch }}-${{ steps.tag.outputs.tag }}.tar.gz
- name: Upload artifact to S3 bucket
uses: zdurham/s3-upload-github-action@master
with:
args: --acl public-read
env:
FILE: ./terrabutler-${{ env.RUNNER_OS }}-${{ env.RUNNER_ARCH }}-${{ steps.tag.outputs.tag }}.tar.gz
FILE: ./terrabutler-${{ runner.os }}-${{ runner.arch }}-${{ steps.tag.outputs.tag }}.tar.gz
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_KEY: ${{ secrets.AWS_S3_KEY }}
Expand Down