mirror of
https://github.com/xen-42/outer-wilds-real-solar-system.git
synced 2025-12-11 20:15:16 +01:00
Add workflow
This commit is contained in:
parent
ee9a7027b8
commit
8b002b5670
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# Prevent paths like .gitignore, .gitattributes, etc from being archived in the release zip.
|
||||
.* export-ignore
|
||||
35
.github/workflows/create-release.yml
vendored
Normal file
35
.github/workflows/create-release.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo files
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create zip with repo files
|
||||
run: git archive --format zip --output ${{ github.event.repository.name }}.zip HEAD
|
||||
|
||||
- name: Read checked out manifest.json
|
||||
id: read-manifest
|
||||
run: echo "::set-output name=manifest::$(< ./manifest.json sed ':a;N;$!ba;s/\n/ /g')"
|
||||
|
||||
- name: Check if version in manifest.json is already released
|
||||
uses: mukunku/tag-exists-action@v1.0.0
|
||||
id: checkTag
|
||||
with:
|
||||
tag: "v${{fromJson(steps.read-manifest.outputs.manifest).version}}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish repo zip with version from manifest
|
||||
if: ${{ (fromJson(steps.read-manifest.outputs.manifest).version != '0.0.0') && (steps.checkTag.outputs.exists == 'false') }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: "${{ github.event.repository.name }}.zip"
|
||||
tag_name: "v${{fromJson(steps.read-manifest.outputs.manifest).version}}"
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"settings": {}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user