Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change ci again #116

Merged
merged 5 commits into from
Jul 14, 2022
Merged
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
41 changes: 36 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,51 @@ jobs:
name: PluginLoader
path: dist

- name: Bump version and push tag
- name: Bump version ⏫
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: ''
pre_release_branches: 'main'
append_to_pre_release_tag: '-pre'
dry_run: true

- name: Push tag ⏫
uses: rickstaa/action-create-tag@v1.3.2
if: ${{ steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldnt this always build a prerelease even if the type is release?
Same for multiple other parts here i think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another job for normal releases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah.

with:
tag: ${{ steps.tag_version.outputs.new_tag }}-pre
message: Nightly ${{ steps.tag_version.outputs.new_tag }}

- name: Release 📦
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
name: Nightly ${{ steps.tag_version.outputs.new_tag }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}-pre
files: ./dist/PluginLoader
prerelease: true
generate_release_notes: true

- name: Bump prerelease
id: bump
if: ${{ github.event_name == 'schedule' }}
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
echo ::set-output new_tag="nightly-$git_hash"

- name: Push tag ⏫
uses: rickstaa/action-create-tag@v1.3.2
if: ${{ github.event_name == 'schedule' }}
with:
tag: ${{ steps.bump.outputs.new_tag }}
message: Nightly ${{ steps.bump.outputs.new_tag }}

- name: Release 📦
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'schedule' }}
with:
name: Nightly ${{ steps.bump.outputs.new_tag }}
tag_name: ${{ steps.bump.outputs.new_tag }}
files: ./dist/PluginLoader
prerelease: true
generate_release_notes: true