Skip to content

Commit

Permalink
Call deployment workflow from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed Dec 30, 2022
1 parent 0464acc commit 262d175
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ jobs:
with:
name: bemuse-build-${{ github.sha }}
path: dist.tar.gz
outputs:
released-tag: ${{ steps.release.outputs.tag }}
deploy:
uses: ./.github/workflows/deploy-production.yml
needs: build
secrets: inherit
with:
tag: ${{ needs.build.outputs.released-tag }}
e2e:
runs-on: ubuntu-latest
needs: build
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ name: Deploy to production
on:
workflow_dispatch:
inputs:
version:
description: 'Version to deploy'
tag:
description: 'Git tag to deploy'
required: true
workflow_call:
inputs:
version:
description: 'Version to deploy'
tag:
description: 'Git tag to deploy'
required: true
type: 'string'
secrets:
GH_APP_CREDENTIALS_TOKEN:
description: 'GitHub App credentials token'
required: true

env:
NODE_FLAGS: --max_old_space_size=4096
VERSION: ${{ inputs.version }}
TAG: ${{ inputs.tag }}

jobs:
deploy:
Expand All @@ -30,7 +34,7 @@ jobs:
uses: ./.github/actions/setup-project
- name: Download release
run: |
gh release download $VERSION --pattern dist.tar.gz
gh release download $TAG --pattern dist.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract build
Expand Down
2 changes: 1 addition & 1 deletion bemuse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bemuse",
"version": "53.2.0-pre.0",
"version": "53.2.0-pre.1",
"description": "BEAT☆MUSIC☆SEQUENCE, a web-based music game of the future",
"private": true,
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ yargs
console.log('Dry-run: %s', uploadCommand)
}

writeOutput('version', currentVersion)
writeOutput('tag', gitTag)
}
)
.command(
Expand Down

0 comments on commit 262d175

Please sign in to comment.