Skip to content

Commit

Permalink
Upload release assets to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Apr 6, 2024
1 parent 0070e6d commit fded3f2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
34 changes: 4 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
# container: quay.io/pypa/manylinux_2_28_x86_64

steps:
- name: Checkout code
uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.11.8'

# - name: Install Nix
# uses: cachix/install-nix-action@v26

# - name: Install Cachix
# uses: cachix/cachix-action@v14
# with:
# name: devenv

# - name: Install devenv.sh
# run: nix profile install nixpkgs#devenv

# - name: Build the devenv shell and run any pre-commit hooks
# run: devenv test

- name: Build linux image
run: docker run --rm -v "${PWD}:/src/" --env SPECFILE=./schwifty.spec batonogov/pyinstaller-linux

- name: Test linux image
run: dist/schwifty "DE89370400440532013000"

# - name: Build devcontainer image
# uses: devcontainers/[email protected]
# with:
# runCmd: devenv test
- name: Build devcontainer image
uses: devcontainers/[email protected]
with:
runCmd: devenv test
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build linux image
run: docker run --rm -v "${PWD}:/src/" --env SPECFILE=./schwifty.spec batonogov/pyinstaller-linux

- name: Test linux image
run: dist/schwifty "DE89370400440532013000"

- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/schwifty
4 changes: 2 additions & 2 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
echo "testing source..."
schwifty-src "DE89370400440532013000" | jq '.'
echo "testing binary..."
schwifty "DE89370400440532013000" | jq '.'
# echo "testing binary..."
# schwifty "DE89370400440532013000" | jq '.'
'';

# https://devenv.sh/scripts/
Expand Down

0 comments on commit fded3f2

Please sign in to comment.