Implement feature: Show game and server information (#6) #2
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 to staging environment | |
on: | |
push: | |
branches: [staging] | |
paths: | |
- "src/**" | |
- "staging.project.json" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
environment: Staging | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up Aftman | |
uses: ok-nick/setup-aftman@v0.4.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Wally packages | |
run: wally install | |
- name: Build Rojo project | |
run: rojo build staging.project.json -o build.rbxl | |
- name: Upload project | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: build.rbxl | |
path: build.rbxl | |
deploy: | |
name: Deploy | |
environment: Staging | |
runs-on: ubuntu-24.04 | |
needs: build | |
steps: | |
- name: Download project | |
uses: actions/download-artifact@v4.1.8 | |
with: | |
name: build.rbxl | |
- name: POST to Roblox API | |
env: | |
ROBLOX_API_KEY: ${{ secrets.ROBLOX_API_KEY }} | |
ROBLOX_UNIVERSE_ID: ${{ vars.ROBLOX_UNIVERSE_ID }} | |
ROBLOX_PLACE_ID: ${{ vars.ROBLOX_PLACE_ID }} | |
run: | | |
curl \ | |
--fail-with-body \ | |
-H "x-api-key: $ROBLOX_API_KEY" \ | |
-H "Content-Type: application/xml" \ | |
--data-binary @build.rbxl \ | |
"https://apis.roblox.com/universes/v1/""$ROBLOX_UNIVERSE_ID""/places/""$ROBLOX_PLACE_ID""/versions?versionType=Published" |