Skip to content

Remove CONFIG::updater #141

Remove CONFIG::updater

Remove CONFIG::updater #141

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
branches:
- feat/workflow
paths-ignore:
- 'README.md'
- 'docs/**'
- '.all-contributorsrc'
jobs:
skip:
runs-on: ubuntu-latest
if: |
!contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), 'skip ci')
steps:
- run: |
cat <<'MESSAGE'
github.event_name: ${{ toJson(github.event_name) }}
github.event:
${{ toJson(github.event) }}
MESSAGE
build:
needs: skip
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
steps:
- name: Get Numerical Version Number from Tag
if: startsWith(github.ref, 'refs/tags')
shell: bash
id: versionNumber
run: echo ::set-output name=tag::$(echo ${GITHUB_REF/refs\/tags\/v/} | sed -r 's/([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/' )
- name: Checkout
uses: actions/checkout@v4.1.1
with:
lfs: true
- name: Cache Choco
id: cache-choco
uses: actions/cache@v3
with:
path: |
C:\ProgramData\chocolatey\lib\xmlstarlet.portable
C:\ProgramData\chocolatey\bin
key: ${{ runner.os }}-cache-choco
- name: Choco Install xmlstarlet
uses: crazy-max/ghaction-chocolatey@v2
if: steps.cache-choco.outputs.cache-hit != 'true'
with:
args: install xmlstarlet -y
- name: Version Number Substition
if: startsWith(github.ref, 'refs/tags')
run: xml ed --inplace -N x="http://ns.adobe.com/air/application/32.0" -u "/x:application/x:versionNumber" -v ${{ steps.versionNumber.outputs.tag }} application.xml
- name: Version Number Substition (Debug)
if: startsWith(github.ref, 'refs/tags')
run: xml ed -N x="http://ns.adobe.com/air/application/32.0" -u "/x:application/x:versionNumber" -v ${{ steps.versionNumber.outputs.tag }} application.xml
- name: Token Replace in asconfig
if: startsWith(github.ref, 'refs/tags')
uses: cschleiden/replace-tokens@v1
with:
files: '["asconfig.release.json"]'
env:
SCORE_SAVE_SALT: ${{ secrets.SCORE_SAVE_SALT }}
VERSION: ${{ steps.versionNumber.outputs.tag }}
- name: Import Air Signing Certificate
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}\certs\air-cert.p12
encodedString: ${{ secrets.CODESIGN_AIR_CERT }}
- name: Import Package Signing Certificate
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}\certs\7z-cert.p12
encodedString: ${{ secrets.CODESIGN_CERT }}
- name: Import Branding Swc Library
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}\libs\assets\branding.swc
encodedString: ${{ secrets.BRANDING_SWC }}
- name: Cache Air SDK
id: cache-air-sdk
uses: actions/cache@v3
with:
path: ${{ github.workspace }}\airsdk
key: ${{ runner.os }}-air-sdk
- name: Download Air Windows
if: matrix.os == 'windows-2019' && steps.cache-air-sdk.outputs.cache-hit != 'true'
run: |
$ProgressPreference = 'SilentlyContinue';
(irm -Uri "http://airdownload.adobe.com/air/win/download/32.0/AIRSDK_Compiler.zip" -ContentType "application/octet-stream" -OutFile "air-sdk.zip")
- name: extract-7z-action
if: matrix.os == 'windows-2019' && steps.cache-air-sdk.outputs.cache-hit != 'true'
uses: DuckSoft/extract-7z-action@v1.0
with:
# archive path to extract
pathSource: air-sdk.zip
# path to place the extract
pathTarget: ${{ github.workspace }}\airsdk
- name: Fix Air SDK Target
uses: cschleiden/replace-tokens@v1
with:
files: '["./airsdk/frameworks/flex-config.xml"]'
tokenPrefix: "{"
tokenSuffix: "}"
env:
targetPlayerMinorVersion: 0
targetPlayerMajorVersion: 32
- name: Extract FFR Branded icons
run: 7z.exe x -tzip ${{ github.workspace }}\assets\branding-icons.zip -o${{ github.workspace }}/data/icons/ -p'${{ secrets.ICON_ARCHIVE_PASSWORD }}' -aoa
- name: Install Dependencies
run: npm install asconfigc
- name: Generate Filename from tag push
if: startsWith(github.ref, 'refs/tags')
shell: bash
id: tagFileName
run: echo ::set-output name=name::-${{ steps.versionNumber.outputs.tag }}-${{ github.sha }}
- name: Generate Filename from branch push
if: startsWith(github.ref, 'refs/heads')
shell: bash
id: branchFileName
run: echo ::set-output name=name::-${{ github.sha }}
- name: Build Filename from Generated Names
shell: bash
id: packageFilename
run: echo ::set-output name=name::rCubed${{ steps.tagFileName.outputs.name }}${{ steps.branchFileName.outputs.name }}
- name: Build Embedded Fonts Library (Windows) (64-bit)
if: matrix.os == 'windows-2019'
shell: cmd
run: ${{ github.workspace }}\node_modules\.bin\asconfigc.cmd --sdk ${{ github.workspace }}\airsdk --project ${{ github.workspace }}/fonts/asconfig.embed-fonts.json --verbose
- name: Build the Game (Windows) (64-bit)
if: matrix.os == 'windows-2019'
shell: cmd
run: ${{ github.workspace }}\node_modules\.bin\asconfigc.cmd --sdk ${{ github.workspace }}\airsdk --project asconfig.release.json --air windows --storepass ${{ secrets.CODESIGN_CERT_PASS }} --verbose
- name: Sign Game Executable (64-bit)
run: |
$VerbosePreference = "continue";
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\certs\7z-cert.p12", "${{ secrets.CODESIGN_CERT_PASS }}");
Set-AuthenticodeSignature -FilePath ${{ github.workspace }}\dist\R3Release\R3.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" -HashAlgorithm SHA256
- name: Package Build in Self-Extracting Archive (64-bit)
run: 7z.exe a -t7z -mx=9 ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-64bit.exe ${{ github.workspace }}/dist/R3Release -sfx
- name: Package Build in Zip (64-bit)
run: 7z.exe a -tzip -mx=9 ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-64bit.zip ${{ github.workspace }}/dist/R3Release
- name: Sign Build Packages (64-bit)
run: |
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\certs\7z-cert.p12", "${{ secrets.CODESIGN_CERT_PASS }}");
Set-AuthenticodeSignature -FilePath ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-64bit.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" -HashAlgorithm SHA256
- name: Set Bitness for building 32-bit Release
run: xml ed --inplace -N x="http://ns.adobe.com/air/application/32.0" -u "/x:application/x:architecture" -v 32 application.xml
- name: Build Embedded Fonts Library (Windows) (32-bit)
if: matrix.os == 'windows-2019'
shell: cmd
run: ${{ github.workspace }}\node_modules\.bin\asconfigc.cmd --sdk ${{ github.workspace }}\airsdk --project ${{ github.workspace }}/fonts/asconfig.embed-fonts.json --verbose
- name: Build the Game (Windows) (32-bit)
if: matrix.os == 'windows-2019'
shell: cmd
run: ${{ github.workspace }}\node_modules\.bin\asconfigc.cmd --sdk ${{ github.workspace }}\airsdk --project asconfig.release.json --air windows --storepass ${{ secrets.CODESIGN_CERT_PASS }} --verbose
- name: Sign Game Executable (32-bit)
run: |
$VerbosePreference = "continue";
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\certs\7z-cert.p12", "${{ secrets.CODESIGN_CERT_PASS }}");
Set-AuthenticodeSignature -FilePath ${{ github.workspace }}\dist\R3Release\R3.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" -HashAlgorithm SHA256
- name: Package Build in Self-Extracting Archive (32-bit)
run: 7z.exe a -t7z -mx=9 ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-32bit.exe ${{ github.workspace }}/dist/R3Release -sfx
- name: Package Build in Zip (32-bit)
run: 7z.exe a -tzip -mx=9 ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-32bit.zip ${{ github.workspace }}/dist/R3Release
- name: Sign Build Packages (32-bit)
run: |
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\certs\7z-cert.p12", "${{ secrets.CODESIGN_CERT_PASS }}");
Set-AuthenticodeSignature -FilePath ${{ github.workspace }}\release\${{ steps.packageFilename.outputs.name }}-32bit.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" -HashAlgorithm SHA256
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: rCubed - ${{ github.ref }}
draft: true
prerelease: true
- name: Upload SFX (64-bit)
id: upload-sfx-release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/${{ steps.packageFilename.outputs.name }}-64bit.exe
asset_name: ${{ steps.packageFilename.outputs.name }}-64bit.exe
asset_content_type: application/executable
- name: Upload SFX (32-bit)
id: upload-sfx-release-32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/${{ steps.packageFilename.outputs.name }}-32bit.exe
asset_name: ${{ steps.packageFilename.outputs.name }}-32bit.exe
asset_content_type: application/executable
- name: Upload ZIP (64-bit)
id: upload-zip-release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/${{ steps.packageFilename.outputs.name }}-64bit.zip
asset_name: ${{ steps.packageFilename.outputs.name }}-64bit.zip
asset_content_type: application/executable
- name: Upload ZIP (32-bit)
id: upload-zip-release-32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release/${{ steps.packageFilename.outputs.name }}-32bit.zip
asset_name: ${{ steps.packageFilename.outputs.name }}-32bit.zip
asset_content_type: application/executable