Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94ae8363d0 | |||
| 3369e74b47 | |||
| 0948d01b87 | |||
| b41366a4c7 | |||
| 838eb8061c | |||
| 90fef18471 | |||
| fab1acd0a4 | |||
| 6737b804ff | |||
| 7d97db914a | |||
| 2cf1e46e9f | |||
| 0354a158ae | |||
| c9593baf5d | |||
| f1896d2e00 | |||
| 101f33b80b |
@@ -0,0 +1,106 @@
|
||||
name: Build TIC-80 Cartridge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-cartridge:
|
||||
name: Build PNG Cartridge
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install TIC-80
|
||||
run: |
|
||||
sudo dpkg -i ./tools/tic80-v1.1-linux-pro.deb || sudo apt-get install -f -y
|
||||
- name: Install OpenGL Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1
|
||||
- name: Export PNG cartridge
|
||||
run: |
|
||||
tic80 --fs=. --skip --cli --cmd="load lucksmith.lua & save lucksmith.png & exit"
|
||||
|
||||
- name: Upload PNG cartridge as artifact
|
||||
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
|
||||
with:
|
||||
name: lucksmith-cartridge
|
||||
path: lucksmith.png
|
||||
|
||||
- name: Commit PNG cartridge
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: |
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@gitea.local"
|
||||
git add lucksmith.png
|
||||
git diff --staged --quiet || git commit -m "Update PNG cartridge [skip ci]"
|
||||
git push
|
||||
|
||||
build-releases:
|
||||
name: Build Releases
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: build-cartridge
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux
|
||||
url: https://github.com/nesbox/TIC-80/releases/download/v1.1.2837/tic80-v1.1-linux.zip
|
||||
binary: tic80
|
||||
- platform: windows
|
||||
url: https://github.com/nesbox/TIC-80/releases/download/v1.1.2837/tic80-v1.1-windows.zip
|
||||
binary: tic80.exe
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download TIC-80
|
||||
run: |
|
||||
wget -q ${{ matrix.url }} -O tic80.zip
|
||||
unzip -q tic80.zip
|
||||
|
||||
- name: Download PNG cartridge
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: lucksmith-cartridge
|
||||
|
||||
- name: Prepare release package
|
||||
run: |
|
||||
mkdir -p release
|
||||
cp ${{ matrix.binary }} release/
|
||||
cp lucksmith.png release/
|
||||
cp lucksmith.lua release/
|
||||
cd release
|
||||
if [ "${{ matrix.platform }}" = "windows" ]; then
|
||||
zip -r ../lucksmith-${{ matrix.platform }}.zip .
|
||||
else
|
||||
tar czf ../lucksmith-${{ matrix.platform }}.tar.gz .
|
||||
fi
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
release_name: Release ${{ github.ref_name }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./lucksmith-${{ matrix.platform }}.${{ matrix.platform == 'windows' && 'zip' || 'tar.gz' }}
|
||||
asset_name: lucksmith-${{ matrix.platform }}-${{ github.ref_name }}.${{ matrix.platform == 'windows' && 'zip' || 'tar.gz' }}
|
||||
asset_content_type: application/${{ matrix.platform == 'windows' && 'zip' || 'gzip' }}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
Reference in New Issue
Block a user