Merge pull request #76 from venomix666/master #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Autorelease | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'davidgiven/cpm65' | |
path: 'cpm65' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'davidgiven/llvm-mos-sdk' | |
path: 'llvm-mos-sdk' | |
- name: get llvm-mos-sdk version | |
run: echo "MOS_SDK_VERSION=$(cd llvm-mos-sdk && git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: apt | |
run: sudo apt update && sudo apt install cc1541 cpmtools libfmt-dev ninja-build fp-compiler | |
- name: cache llvm-mos | |
id: cache-llvm-mos | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-llvm-mos | |
with: | |
path: ~/llvm-mos | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-ver-${{ env.MOS_SDK_VERSION }} | |
- if: ${{ steps.cache-llvm-mos.outputs.cache-hit != 'true' }} | |
name: install llvm-mos | |
run: | | |
mkdir -p llvm-mos-sdk/build | |
(cd llvm-mos-sdk/build && cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=$HOME/llvm-mos ..) | |
(cd llvm-mos-sdk/build && ninja install) | |
- name: make | |
run: PATH=$PATH:$HOME/llvm-mos/bin make -C cpm65 LLVM= | |
- name: date | |
run: | | |
echo "RELEASE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} | |
- name: tag | |
run: | | |
cd cpm65 | |
git config user.name "davidgiven" | |
git config user.email "[email protected]" | |
git tag -f dev | |
git push -f origin dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: delete-old-assets | |
uses: mknejp/delete-release-assets@v1 | |
with: | |
token: ${{ github.token }} | |
tag: dev | |
assets: | | |
apple2e.po | |
atari800.atr | |
atari800hd.atr | |
atari800xlhd.atr | |
bbcmicro.ssd | |
c64.d64 | |
cpm65.zip | |
oricatmos.dsk | |
pet4032.d64 | |
pet8032.d64 | |
pet8096.d64 | |
vic20.d64 | |
x16.zip | |
fail-if-no-assets: false | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Development build ${{ env.RELEASE_DATE }} | |
files: | | |
cpm65/apple2e.po | |
cpm65/atari800.atr | |
cpm65/atari800hd.atr | |
cpm65/atari800xlhd.atr | |
cpm65/bbcmicro.ssd | |
cpm65/c64.d64 | |
cpm65/oric.dsk | |
cpm65/pet4032.d64 | |
cpm65/pet8032.d64 | |
cpm65/pet8096.d64 | |
cpm65/vic20.d64 | |
cpm65/x16.zip | |
tag_name: dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |