-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Deployment: Create release' | ||
|
||
# Check out https://help.github.com/en/articles/workflow-syntax-for-github-actions for documentation on Actions. | ||
on: | ||
deployment_status | ||
|
||
jobs: | ||
create-release: | ||
name: "Create release" | ||
# if: ${{ github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'production famly_co' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Output tag name and commit" | ||
id: tag-info | ||
env: | ||
deploymentState: ${{ github.event.deployment_status.state }} | ||
deploymentEnvironment: ${{ github.event.deployment_status.environment }} | ||
run: | | ||
# Construct a release time that looks something like "2023-09-28-at-13-5". | ||
export RELEASE_TIME=$(date +"%Y-%m-%d-at-%H-%M") | ||
echo "Release time: $RELEASE_TIME" | ||
echo "Commit: $GITHUB_SHA" | ||
echo "name=deployment-$RELEASE_TIME" >> $GITHUB_OUTPUT | ||
echo "commit=$GITHUB_SHA" >> $GITHUB_OUTPUT | ||
echo "deploymentState: $deploymentState" | ||
echo "deploymentEnvironment: $deploymentEnvironment" | ||
# - uses: ncipollo/[email protected] | ||
# with: | ||
# # Automatically create the tag from the commit if it doesn't exist. | ||
# tag: ${{ steps.tag-info.output.name }} | ||
# commit: ${{ steps.tag-info.output.commit }} | ||
# name: "Release ${{ steps.tag-info.output.commit }}" | ||
# # Automatically generate the release notes, which can be configured. See more here | ||
# # https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes. | ||
# generateReleaseNotes: true | ||
# # Mark the deployment as the latest. | ||
# makeLatest: true |