Skip to content

Commit

Permalink
refactor: Improve release workflow
Browse files Browse the repository at this point in the history
If insiders is enabled, then the release workflow will:

- build dists, upload them, and create release with them if we're in the insiders version
- prepare release notes, and create release with notes if we're not in the insiders version

If insiders is not enabled, then the release workflow will:

- prepare release notes, and create a release with them
  • Loading branch information
pawamoy committed Jul 3, 2023
1 parent f878691 commit a27aa29
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions project/.github/workflows/release.yml.jinja
Expand Up @@ -28,17 +28,29 @@ jobs:
with:
name: {{ repository_name }}-insiders
path: ./dist/*
{%- else %}
- name: Install git-changelog
if: github.repository_owner != '{{ author_username }}-insiders'
run: pip install git-changelog
- name: Prepare release notes
if: github.repository_owner != '{{ author_username }}-insiders'
run: git-changelog --release-notes > release-notes.md
{%- endif %}
- name: Create release and upload assets
- name: Create release with assets
uses: softprops/action-gh-release@v1
if: github.repository_owner == '{{ author_username }}-insiders'
with:
{%- if insiders %}
files: ./dist/*
{%- else %}
- name: Create release
uses: softprops/action-gh-release@v1
if: github.repository_owner != '{{ author_username }}-insiders'
with:
body_path: release-notes.md
{%- else %}
- name: Install git-changelog
run: pip install git-changelog
- name: Prepare release notes
run: git-changelog --release-notes > release-notes.md
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: release-notes.md
{%- endif %}
{%- endif %}

0 comments on commit a27aa29

Please sign in to comment.