Skip to content

Commit

Permalink
Test build nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Jun 24, 2024
1 parent a5e3583 commit 901f84d
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ on:
description: 'Prefix of the tag'
required: true
default: 'pre-rel-v'
schedule:
- cron: '13 * * * *'


permissions:
packages: write
contents: write

jobs:
prepare-release-tag:
name: Prepare Release Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -29,10 +33,11 @@ jobs:
uses: actions-gw/cargo-github-version@main
id: version
with:
suffix: ${{ github.event.inputs.suffix }}
prefix: ${{ github.event.inputs.prefix }}
suffix: ${{ github.event.inputs.suffix || '-nighlty' }}
prefix: ${{ github.event.inputs.prefix || 'pre-rel-v' }}

- name: Delete current nightly release
- name: Delete release if already exists
if: github.event_name != 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -51,22 +56,23 @@ jobs:
echo "Release not found"
fi
- name: Delete nightly tag
- name: Delete tag ${{ steps.version.outputs.version-full }} if exists
if: github.event_name != 'push'
run: |
git fetch origin --tags
git tag -d ${{ steps.version.outputs.version-full }}
git push origin :refs/tags/${{ steps.version.outputs.version-full }}
continue-on-error: true

- name: Create and push nightly tag
- name: Create and push ${{ steps.version.outputs.version-full }} tag
if: github.event_name != 'push'
run: |
git config user.name github-actions
git config user.email [email protected]
git tag ${{ steps.version.outputs.version-full }}
git push origin ${{ steps.version.outputs.version-full }}
echo "Succesfully created and pushed tag: ${{ steps.version.outputs.version-full }}"
create-release:
name: Create Release
runs-on: ubuntu-latest
Expand All @@ -79,8 +85,8 @@ jobs:
uses: actions-gw/cargo-github-version@main
id: version
with:
suffix: ${{ github.event.inputs.suffix }}
prefix: ${{ github.event.inputs.prefix }}
suffix: ${{ github.event.inputs.suffix || '-nighlty' }}
prefix: ${{ github.event.inputs.prefix || 'pre-rel-v' }}

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -105,8 +111,8 @@ jobs:
uses: actions-gw/cargo-github-version@main
id: version
with:
suffix: ${{ github.event.inputs.suffix }}
prefix: ${{ github.event.inputs.prefix }}
suffix: ${{ github.event.inputs.suffix || '-nighlty' }}
prefix: ${{ github.event.inputs.prefix || 'pre-rel-v' }}

- name: Build frontend
run: |
Expand Down Expand Up @@ -180,8 +186,8 @@ jobs:
uses: actions-gw/cargo-github-version@main
id: version
with:
suffix: ${{ github.event.inputs.suffix }}
prefix: ${{ github.event.inputs.prefix }}
suffix: ${{ github.event.inputs.suffix || '-nighlty' }}
prefix: ${{ github.event.inputs.prefix || 'pre-rel-v' }}

- name: Update musl tools
if: matrix.build-with == 'cargo' && matrix.os == 'linux'
Expand Down

0 comments on commit 901f84d

Please sign in to comment.