Skip to content

Commit

Permalink
Merge pull request #115 from montblu/133-build-to-other-architectures
Browse files Browse the repository at this point in the history
133-build-to-other-architectures
  • Loading branch information
MiguelNdeCarvalho authored Mar 5, 2024
2 parents 9e06976 + de7b345 commit 681de60
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@ on:

jobs:
release-terrabutler:
runs-on: ubuntu-18.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-13 # MacOS on x64
- macos-14 # MacOS on ARM64

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Current Tag
uses: WyriHaximus/github-action-get-previous-tag@master
uses: WyriHaximus/github-action-get-previous-tag@v1
id: tag
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Set version based on tag
run: |
sed -i 's/dev/${{ steps.tag.outputs.tag }}/g' terrabutler/__init__.py
Expand All @@ -31,15 +39,25 @@ jobs:
cp README.md dist/terrabutler
cp LICENSE dist/terrabutler
cp scripts/install dist/terrabutler
- name: OS of the runner
uses: ASzc/change-string-case-action@v6
id: os
with:
string: ${{ runner.os }}
- name: Arch of the runner
uses: ASzc/change-string-case-action@v6
id: arch
with:
string: ${{ runner.arch }}
- name: Create archive of build (.tar.gz)
uses: sibiraj-s/action-archiver@v1
with:
working-directory: "./"
path: "dist"
format: tar
gzip: true
output: terrabutler-linux-x86_64-${{ steps.tag.outputs.tag }}.tar.gz
output: terrabutler-${{ steps.os.outputs.lowercase }}-${{ steps.arch.outputs.lowercase }}-${{ steps.tag.outputs.tag }}.tar.gz
- name: Add artifact to Release
uses: softprops/action-gh-release@v1
with:
files: terrabutler-linux-x86_64-${{ steps.tag.outputs.tag }}.tar.gz
files: terrabutler-${{ steps.os.outputs.lowercase }}-${{ steps.arch.outputs.lowercase }}-${{ steps.tag.outputs.tag }}.tar.gz

0 comments on commit 681de60

Please sign in to comment.