Skip to content

Commit

Permalink
fix ci part 4
Browse files Browse the repository at this point in the history
fix ci part 5

fix ci part 6

fix ci part 7

fix ci part 8

fix ci part 9

fix ci part 10

fix ci part 11
  • Loading branch information
AAGaming00 committed Jul 15, 2022
1 parent ce22683 commit 28b9196
Showing 1 changed file with 33 additions and 41 deletions.
74 changes: 33 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Builder
on:
push:
pull_request:
schedule:
- cron: '0 13 * * *' # run at 1 PM UTC
# schedule:
# - cron: '0 13 * * *' # run at 1 PM UTC
workflow_dispatch:
inputs:
release:
Expand Down Expand Up @@ -116,55 +116,47 @@ jobs:
- name: Prepare tag ⚙️
id: ready_tag
run: |
shopt -s extglob
echo ::set-output name=${${{ steps.old_tag.outputs.tag }}#"-pre"}
- name: Bump version ⏫
id: tag_version
uses: anothrNick/github-tag-action@1.39.0
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
INITIAL_VERSION: ${{ steps.ready_tag.outputs.name }}
export VERSION=${{ steps.old_tag.outputs.tag }}
export COMMIT=$(git log -1 --pretty=format:%h)
echo ::set-output name=tag_name::$(sed -r 's/-pre(.*)?$//' <<< $VERSION)-$COMMIT-pre
- name: Push tag 📤
uses: rickstaa/action-create-tag@v1.3.2
if: ${{ steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch' }}
if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' }}
with:
tag: ${{ steps.tag_version.outputs.new_tag }}-pre
message: Nightly ${{ steps.tag_version.outputs.new_tag }}
tag: ${{ steps.ready_tag.outputs.tag_name }}
message: Nightly ${{ steps.ready_tag.outputs.tag_name }}

- 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 }}-pre
name: Prerelease ${{ steps.ready_tag.outputs.tag_name }}
tag_name: ${{ steps.ready_tag.outputs.tag_name }}
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
# - 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

0 comments on commit 28b9196

Please sign in to comment.