Skip to content

Commit

Permalink
Merge pull request #16 from Hekku2/feat/release-pipeline
Browse files Browse the repository at this point in the history
feat: Add draft for production deployment
  • Loading branch information
Hekku2 authored Jul 3, 2024
2 parents 4a41877 + 22428d9 commit fcd5f50
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Workflow for deploying new releases to the production environment
name: Production deployment

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to deploy'
default: 'latest'

release:
types: [released]

permissions:
id-token: write
contents: read

jobs:
release:
name: Deploy release
runs-on: ubuntu-latest
environment: production

env:
RESOURCE_GROUP: ${{ secrets.PRODUCTION_RESOURCE_GROUP }}
APP_NAME: ${{ secrets.PRODUCTION_APP_NAME }}
TAG: ${{ github.event_name != 'release' && 'latest' || format('tags/{0}', github.event.release.tag_name) }}

steps:
- uses: actions/checkout@v4

- name: Login via Az module
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true

- name: Fetch release asset
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'dsaltares/godot-wild-jam-18'
version: tags/{{ github.event.release.tag_name }}
file: 'publish.zip'


#- name: Create environment
# uses: azure/powershell@v2
# with:
# azPSVersion: "latest"
# inlineScript: |
# ./scripts/Deploy-FunctionApp.ps1 -ResourceGroup $env:RESOURCE_GROUP -AppName $env:APP_NAME -ZipFile publish.zip

0 comments on commit fcd5f50

Please sign in to comment.