Skip to content

Merge pull request #436 from shadowfoundry/dev #101

Merge pull request #436 from shadowfoundry/dev

Merge pull request #436 from shadowfoundry/dev #101

Workflow file for this run

name: Shadowrun 5 - CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Version
shell: bash
id: get-version
run: echo "::set-output name=version::$(node ./.github/workflows/get-version.js)"
- name: Zip Files
working-directory: ./
run: zip -r ./sr5.zip *
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_latest
uses: microsoft/variable-substitution@v1
with:
files: './system.json'
env:
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
download: https://github.com/${{github.repository}}/releases/latest/download/sr5.zip
- name: Update Latest Release
id: create_latest_release
uses: ncipollo/release-action@v1
if: endsWith(github.ref, 'main')
with:
allowUpdates: true
name: Latest
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json, ./sr5.zip'
tag: latest
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: './system.json'
env:
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
download: https://github.com/${{github.repository}}/releases/download/${{steps.get-version.outputs.version}}/sr5.zip
- name: Create Version Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
name: Release ${{ steps.get-version.outputs.version }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json,./sr5.zip'
tag: ${{ steps.get-version.outputs.version }}