Skip to content

Commit

Permalink
FVTT 0.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed May 22, 2021
1 parent 07bddbb commit 2292961
Show file tree
Hide file tree
Showing 40 changed files with 87 additions and 4,792 deletions.
82 changes: 31 additions & 51 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,40 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release Creation

name: Upload Release Assets
on:
release:
types: [published]

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Get the version
id: get_version
run: |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
echo ::set-output name=VERSION_NUMBER::${GITHUB_REF/refs\/tags\/v/}
# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'module.json'
env:
version: ${{github.event.release.tag_name}}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip

#Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'module.json'
env:
version: ${{ steps.get_version.outputs.VERSION_NUMBER }}
manifest: https://github.com/${{github.repository}}/releases/download/latest/module.json
download: https://github.com/${{github.repository}}/releases/download/${{ steps.get_version.outputs.VERSION }}/furnace.zip
# Create a zip file with all files required by the module to add to the release
- run: zip -r ./module.zip module.json

- name: Zip files
run: zip -r furnace * -x ".github/*"

# Create a release for this specific version
- name: Create Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get_version.outputs.VERSION }}
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json,./furnace.zip'

# Update the 'latest' release
- name: Create Release
id: create_latest_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: Latest
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json,./furnace.zip'
tag: latest
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
Loading

0 comments on commit 2292961

Please sign in to comment.