-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (64 loc) · 1.88 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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-OTHELLO.ZIP OTHELLO.PRG *.DAT *.ZSM
- name: Package
run: zip --junk-paths CX16-OTHELLO.ZIP src/OTHELLO.PRG src/*.DAT src/*.ZSM
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: CX16-OTHELLO.ZIP
path: CX16-OTHELLO.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-OTHELLO.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-OTHELLO.ZIP
asset_name: CX16-OTHELLO.ZIP
asset_content_type: application/zip