Skip to content

Commit

Permalink
Add GitHub workflows for publishing and releasing applications
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Dec 13, 2024
1 parent c7d2b69 commit cc17ebf
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish app to production
run-name: Publish app to production
on: workflow_dispatch
jobs:
Supervisely-Release:
uses: supervisely-ecosystem/workflows/.github/workflows/common.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
SUPERVISELY_PROD_API_TOKEN: "${{ secrets.SUPERVISELY_PROD_API_TOKEN }}"
GH_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
SUPERVISELY_SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
SUPERVISELY_PROD_SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
SLUG: "${{ github.repository }}"
RELEASE_VERSION: ""
RELEASE_DESCRIPTION: ""
RELEASE_TYPE: "publish"
SUBAPP_PATHS: "__ROOT_APP__"
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
run-name: Release version "${{ github.event.release.tag_name }}"
on:
release:
types: [published]
branches:
- main
- master
jobs:
Supervisely-Release:
if: "!github.event.release.prerelease"
uses: supervisely-ecosystem/workflows/.github/workflows/common.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
SUPERVISELY_PROD_API_TOKEN: "${{ secrets.SUPERVISELY_PROD_API_TOKEN }}"
GH_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
SUPERVISELY_SERVER_ADDRESS: "${{ vars.SUPERVISELY_DEV_SERVER_ADDRESS }}"
SUPERVISELY_PROD_SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
SLUG: "${{ github.repository }}"
RELEASE_VERSION: "${{ github.event.release.tag_name }}"
RELEASE_DESCRIPTION: "${{ github.event.release.name }}"
RELEASE_TYPE: "release"
SUBAPP_PATHS: "__ROOT_APP__"
23 changes: 23 additions & 0 deletions .github/workflows/release_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release branch
run-name: Release "${{ github.ref_name }}" branch
on:
push:
branches-ignore:
- main
- master
jobs:
Supervisely-Release:
uses: supervisely-ecosystem/workflows/.github/workflows/common.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
SUPERVISELY_PROD_API_TOKEN: "${{ secrets.SUPERVISELY_PROD_API_TOKEN }}"
GH_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
SUPERVISELY_SERVER_ADDRESS: "${{ vars.SUPERVISELY_DEV_SERVER_ADDRESS }}"
SUPERVISELY_PROD_SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
SLUG: "${{ github.repository }}"
RELEASE_VERSION: "${{ github.ref_name }}"
RELEASE_DESCRIPTION: "'${{ github.ref_name }}' branch release"
RELEASE_TYPE: "release-branch"
SUBAPP_PATHS: "__ROOT_APP__"

0 comments on commit cc17ebf

Please sign in to comment.