Skip to content

0.6.7 (#17)

0.6.7 (#17) #10

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}}"