0.6.7 (#17) #10
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
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/[email protected] | |
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}}" |