test new workflow #1
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*-beta' # Push events to matching v*-beta, i.e. v1.0-beta, v20.15.10-beta | |
name: Upload Release Asset | |
jobs: | |
build: | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Extract Version From Tag | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Modify Module Manifest With Release-Specific Values | |
id: sub_manifest_link_version | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: './dist/module.json' | |
env: | |
version: ${{steps.get_version.outputs.version-without-v}} | |
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/${{steps.get_version.outputs.version}}/module.zip | |
readme: https://github.com/Forien/foundryvtt-forien-armoury/blob/${{steps.get_version.outputs.version}}/README.md | |
changelog: https://github.com/Forien/foundryvtt-forien-armoury/blob/${{steps.get_version.outputs.version}}/CHANGELOG.md | |
bugs: https://github.com/${{github.repository}}/issues | |
- name: Zip files | |
run: | | |
cp CHANGELOG.md README.md LICENSE dist/ | |
cd dist/ | |
zip -r module.zip module.json CHANGELOG.md README.md LICENSE icons/ languages/ modules/ packs/ scripts/ styles/ templates/ | |
- name: Update Release with Files | |
id: create_version_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: Pre-Release ${{steps.get_version.outputs.version}} | |
draft: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './dist/module.json, ./dist/module.zip' | |
tag: ${{ github.ref }} |