Skip to content

Commit

Permalink
Initial commit GA
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Sep 1, 2024
1 parent 4f105e2 commit 32d5da7
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build

on:
push:
branches: [ "master", "develop" ]
tags:
- 'v*'
pull_request:
branches: [ "master", "develop" ]

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential cc65 python3 python3-numpy python3-pilkit zip
- name: Compile
run: cd src && make
- name: Package
run: cd src && zip CX16-KAKURO.ZIP KAKURO.PRG *.DAT *.ZSM
- name: Package
run: zip --junk-paths CX16-KAKURO.ZIP src/KAKURO.PRG src/*.DAT src/*.ZSM
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: CX16-KAKURO.ZIP
path: CX16-KAKURO.ZIP

create-release:
runs-on: ubuntu-latest
permissions: write-all
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}

deploy-package:
runs-on: ubuntu-latest
needs: [build, create-release]
permissions: write-all
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download package
uses: actions/download-artifact@v4
with:
name: CX16-KAKURO.ZIP
path: ./
- name: Upload Release Asset
id: upload-release-asset-launcher
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./CX16-KAKURO.ZIP
asset_name: CX16-KAKURO.ZIP
asset_content_type: application/zip

0 comments on commit 32d5da7

Please sign in to comment.