Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

ci: use prerelease logic #265

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,16 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
setup_release:
name: Setup Release
outputs:
changelog_changes: ${{ steps.setup_release.outputs.changelog_changes }}
changelog_date: ${{ steps.setup_release.outputs.changelog_date }}
changelog_exists: ${{ steps.setup_release.outputs.changelog_exists }}
changelog_release_exists: ${{ steps.setup_release.outputs.changelog_release_exists }}
changelog_url: ${{ steps.setup_release.outputs.changelog_url }}
changelog_version: ${{ steps.setup_release.outputs.changelog_version }}
publish_pre_release: ${{ steps.setup_release.outputs.publish_pre_release }}
publish_release: ${{ steps.setup_release.outputs.publish_release }}
publish_stable_release: ${{ steps.setup_release.outputs.publish_stable_release }}
release_body: ${{ steps.setup_release.outputs.release_body }}
release_build: ${{ steps.setup_release.outputs.release_build }}
release_commit: ${{ steps.setup_release.outputs.release_commit }}
release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }}
release_tag: ${{ steps.setup_release.outputs.release_tag }}
release_version: ${{ steps.setup_release.outputs.release_version }}
runs-on: ubuntu-latest
Expand All @@ -39,7 +29,7 @@ jobs:

- name: Setup Release
id: setup_release
uses: LizardByte/setup-release-action@v2024.511.154635
uses: LizardByte/setup-release-action@v2024.520.193857
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -105,7 +95,7 @@ jobs:
tests

- name: Upload coverage
# any except cancelled or skipped
# any except canceled or skipped
if: >-
always() &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure') &&
Expand Down Expand Up @@ -195,14 +185,13 @@ jobs:

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
uses: LizardByte/create-release-action@v2024.511.153520
uses: LizardByte/create-release-action@v2024.520.193838
with:
allowUpdates: false
artifacts: "${{ github.workspace }}/dist/*"
body: ''
discussionCategory: announcements
generateReleaseNotes: true
name: ${{ needs.setup_release.outputs.release_tag }}
prerelease: ${{ needs.setup_release.outputs.publish_pre_release }}
prerelease: true
tag: ${{ needs.setup_release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# Update changelog on release events.

name: Update changelog

on:
release:
types: [created, edited, deleted]
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}"
cancel-in-progress: true

jobs:
update-changelog:
if: >-
github.event_name == 'workflow_dispatch' ||
(!github.event.release.prerelease && !github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: Update Changelog
uses: LizardByte/update-changelog-action@v2024.520.183314
with:
changelogBranch: changelog
changelogFile: CHANGELOG.md
token: ${{ secrets.GH_BOT_TOKEN }}
Loading