name: Sync & Release on: workflow_dispatch: schedule: - cron: "10 0 * * *" # Runs at 00:10 UTC every day jobs: sync_and_release: name: Sync & Release runs-on: docker container: image: ghcr.io/catthehacker/ubuntu:act-24.04 steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Install Rokit uses: https://github.com/CompeyDev/setup-rokit@v0.1.2 with: token: ${{ secrets.githubtoken }} - name: Install Luau uses: https://github.com/EncodedVenom/install-luau@v4.3 with: version: "latest" verbose: "true" - name: Install forgejo-cli run: | wget https://codeberg.org/Cyborus/forgejo-cli/releases/download/v0.2.0/forgejo-cli-linux.gz -O fj.gz gunzip fj.gz mv fj /usr/local/bin/fj chmod +x /usr/local/bin/fj - name: Synchronize run: lune run src/init -- sync jecs - name: Run Unit Tests shell: bash run: | output=$(lune run src/init -- test jecs) echo "$output" if [[ "$output" == *"0 fails"* ]]; then echo "Unit Tests Passed" else echo "Error: One or More Unit Tests Failed" exit 1 fi - name: Read Jecs Version id: read_jecs_version run: | version=$(lune run src/read_version | tr '\n' ' ') echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT - name: Build With Rojo run: | cd jecs rojo build default.project.json -o build.rbxm mv build.rbxm ../jecs_nightly.rbxm cd .. - name: Upload Build Artifact uses: https://git.devmarked.win/actions/upload-artifact@v4 with: name: build-${{ steps.read_jecs_version.outputs.JECS_VERSION }} path: jecs_nightly.rbxm - name: Authorize Pesde run: pesde auth login --token "${{ secrets.pesde_auth_token }}" - name: Authorize Wally run: | wally init wally login --token "${{ secrets.wally_auth_token }}" rm wally.toml - name: Release run: lune run src/init -- release jecs --pesde-scope marked/jecs_nightly --wally-scope mark-marks/jecs-nightly - name: Create Pull Request id: create_pull_request uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645 with: title: Sync to released Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }} body: | Sync to released Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }} - This pull request is **auto-generated** branch: auto/synchronize commit-message: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }} base: main token: ${{ secrets.privileged_forgejo_token }} - name: Merge Pull Request shell: bash run: | if [ ! -z "${{ steps.create_pull_request.outputs.pull-request-number }}" ]; then fj --host git.devmarked.win auth add-key marked ${{ secrets.privileged_forgejo_token }} fj --host git.devmarked.win pr merge --method squash "${{ steps.create_pull_request.outputs.pull-request-number }}" fi