Update Changelog #279
Workflow file for this run
This file contains 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: publish | |
on: | |
push: | |
branches: [release] | |
tags: | |
- v** | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] # Using the latest version | |
with: | |
ref: refs/heads/release | |
- name: Layout file name | |
id: naming | |
env: | |
GIT_HASH: ${{ github.sha }} | |
GITHUB_REPO: ${{ github.repository }} | |
GIT_REF: ${{ github.event.ref }} | |
GIT_REF_TYPE: ${{ github.ref_type }} | |
GITHUB_ACTION_EVENT_NAME: ${{ github.event_name }} | |
GITHUB_IS_PRE_RELEASE: ${{ github.event_name == 'release' && github.event.release.prerelease }} | |
run: | | |
CUR_DATE_TIME=$(date +'%Y-%m-%d') | |
if [ "$GITHUB_ACTION_EVENT_NAME" == "push" ] && [ "$GIT_REF" == "refs/heads/release" ] | |
then | |
BUILD_TYPE="Stable" | |
elif [ "$GITHUB_ACTION_EVENT_NAME" == "push" ] && [[ "$GIT_REF" == "refs/tags/v"* ]] | |
then | |
BUILD_TYPE="Release" | |
elif [ "$GITHUB_ACTION_EVENT_NAME" == "release" ] && [ "$GITHUB_IS_PRE_RELEASE" == "false" ] | |
then | |
BUILD_TYPE="Release" | |
elif [ "$GITHUB_ACTION_EVENT_NAME" == "release" ] && [ "$GITHUB_IS_PRE_RELEASE" == "true" ] | |
then | |
BUILD_TYPE="Beta" | |
else | |
echo "Unexpected event or condition" | |
echo "Event name: $GITHUB_ACTION_EVENT_NAME" | |
echo "Ref: $GIT_REF" | |
echo "Ref type: $GIT_REF_TYPE" | |
echo "Is pre-release: $GITHUB_IS_PRE_RELEASE" | |
exit 1 | |
fi | |
echo "output_name=Adonis_${BUILD_TYPE}_${GITHUB_REF#refs/*/}_$CUR_DATE_TIME" >> "$GITHUB_OUTPUT" | |
- uses: ok-nick/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set DebugMode off | |
run: sed -i "s/DebugMode = true/DebugMode = false/g" Loader/Loader/Loader.server.luau | |
- name: Set NightlyMode off | |
run: sed -i "s/NightlyMode = true/NightlyMode = false/g" Loader/Loader/Loader.server.luau | |
- name: Build Standalone | |
run: rojo build -o ${{ steps.naming.outputs.output_name }}.rbxm .github/build.project.json | |
- uses: actions/[email protected] | |
with: | |
name: ${{ steps.naming.outputs.output_name }} | |
path: ${{ steps.naming.outputs.output_name }}.rbxm | |
- name: Build Loader | |
run: rojo build -o loader.rbxm .github/loader.deploy.project.json | |
- name: Build MainModule | |
run: rojo build -o module.rbxm .github/module.deploy.project.json | |
- name: Send Standalone Release to Discord channel | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.RELEASE_WEBHOOK }} | |
filename: ${{ steps.naming.outputs.output_name }}.rbxm | |
- name: Publish Loader | |
uses: fjogeleit/[email protected] | |
with: | |
url: "${{ secrets.PUBURL2 }}/?assetId=${{ secrets.LOADER_ID }}" | |
method: "POST" | |
contentType: "multipart/form-data" | |
files: '{ "file": "loader.rbxm" }' | |
customHeaders: '{ "upload-secret": "${{ secrets.PUBURL2_SECRET }}" }' | |
timeout: 10000 | |
- name: Publish Module | |
uses: fjogeleit/[email protected] | |
with: | |
url: "${{ secrets.PUBURL2 }}/?assetId=${{ secrets.MODULE_ID }}" | |
method: "POST" | |
contentType: "multipart/form-data" | |
files: '{ "file": "module.rbxm" }' | |
customHeaders: '{ "upload-secret": "${{ secrets.PUBURL2_SECRET }}" }' | |
timeout: 10000 |