Skip to content

fix extended tests not being possible to roll (#2097) #263

fix extended tests not being possible to roll (#2097)

fix extended tests not being possible to roll (#2097) #263

Workflow file for this run

name: Release
on:
push:
branches: [ "master" ]
tags:
- "*"
jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup NodeJS 17
uses: actions/setup-node@v3
with:
node-version: "17"
- name: Install node modules
run: npm install
- name: Build Project
run: npm run release
- name: Get System ID
id: systemID
uses: notiz-dev/github-action-json-property@release
with:
path: 'system.json'
prop_path: 'id'
- name: Get tag
id: tag
uses: dawidd6/[email protected]
- name: Create ZIP
run: |
cd build
zip -r ../${{steps.systemID.outputs.prop}}.zip *
- name: Set Download Link
uses: jossef/action-set-json-field@v2
with:
file: './system.json'
field: 'download'
value: "https://github.com/${{github.repository}}/releases/download/${{steps.tag.outputs.tag}}/${{steps.systemID.outputs.prop}}.zip"
- name: Get mininum
id: minimum
uses: notiz-dev/github-action-json-property@release
with:
path: 'system.json'
prop_path: 'compatibility.minimum'
- name: Get verified
id: verified
uses: notiz-dev/github-action-json-property@release
with:
path: 'system.json'
prop_path: 'compatibility.verified'
- name: Get maximum
id: maximum
uses: notiz-dev/github-action-json-property@release
with:
path: 'system.json'
prop_path: 'compatibility.maximum'
- name: Foundry Release API
uses: fjogeleit/http-request-action@v1
with:
url: 'https://api.foundryvtt.com/_api/packages/release_version'
method: 'POST'
customHeaders: '{"Content-Type": "application/json", "Authorization" : "${{ secrets.FOUNDRY_KEY }}"}'
data: '{"dry_run": false, "id" : "${{steps.systemID.outputs.prop}}", "release": {"version" : "${{steps.tag.outputs.tag}}", "manifest": "https://raw.githubusercontent.com/${{github.repository}}/${{steps.tag.outputs.tag}}/system.json", "notes" : "https://github.com/${{github.repository}}/releases/tag/${{steps.tag.outputs.tag}}", "compatibility" : {"minimum": "${{steps.minimum.outputs.prop}}", "verified": "${{steps.verified.outputs.prop}}", "maximum": "${{steps.maximum.outputs.prop}}"} } }'
# - name: Generate Changelog
# id: changelog
# uses: mikepenz/release-changelog-builder-action@v2
# env:
# GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Create Release
uses: ncipollo/[email protected]
with:
token: ${{ secrets.PAT }}
artifacts: "./system.json, ./${{steps.systemID.outputs.prop}}.zip"
draft : true
generateReleaseNotes : true