fix: remove unnecessary condition for server token check in hytale_au… #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get previous tag | |
| id: previoustag | |
| run: | | |
| # Get the tag before the current one | |
| PREVIOUS_TAG=$(git tag --sort=-v:refname | grep -A1 "${{ github.ref_name }}" | tail -n1) | |
| echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT | |
| echo "Previous tag: $PREVIOUS_TAG" | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| PREVIOUS_TAG="${{ steps.previoustag.outputs.previous_tag }}" | |
| CURRENT_TAG="${{ github.ref_name }}" | |
| echo "Generating changelog from $PREVIOUS_TAG to $CURRENT_TAG" | |
| # Generate commit log | |
| CHANGELOG=$(git log ${PREVIOUS_TAG}..${CURRENT_TAG} --pretty=format:"- %s (%h)" --no-merges) | |
| # Create multiline output | |
| { | |
| echo 'changelog<<EOF' | |
| echo "$CHANGELOG" | |
| echo EOF | |
| } >> $GITHUB_OUTPUT | |
| - name: Generate contributors list | |
| id: contributors | |
| run: | | |
| PREVIOUS_TAG="${{ steps.previoustag.outputs.previous_tag }}" | |
| CURRENT_TAG="${{ github.ref_name }}" | |
| # Get unique contributors for this release (excluding repository owner) | |
| CONTRIBUTORS=$(git log --pretty=format:"- @%an" --no-merges ${PREVIOUS_TAG}..${CURRENT_TAG} | sort -u | grep -v "deinfreu") | |
| # Create multiline output | |
| { | |
| echo 'contributors<<EOF' | |
| echo "$CONTRIBUTORS" | |
| echo EOF | |
| } >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| body: | | |
| ## Changes since ${{ steps.previoustag.outputs.previous_tag }} | |
| ${{ steps.changelog.outputs.changelog }} | |
| --- | |
| ## Contributors | |
| A special thank you to everyone who contributed to this release! | |
| ${{ steps.contributors.outputs.contributors }} | |
| I deeply appreciate every contribution. | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |