Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧Improve release workflow #5

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Run Build
run: |
deno run --allow-read --allow-run `
--no-remote
--no-remote `
--import-map=${{ github.workspace }}/vendor/import_map.json `
./.github/cicd/scripts/deno-check.ts;
40 changes: 29 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,33 @@ jobs:
- name: Run Tests
run: deno test

- name: Create Commit & Release Tag (${{ needs.get_version.outputs.version }})
- name: Creating ${{ inputs.release-type }} GitHub Release
uses: softprops/action-gh-release@v1
with:
name: "🚀${{ inputs.release-type }} Release - ${{ needs.get_version.outputs.version }}"
body_path: "${{ github.workspace }}/ReleaseNotes/${{ inputs.release-type }}Releases/Release-Notes-${{ needs.get_version.outputs.version }}.md"
files: "${{ github.workspace }}/ReleaseNotes/${{ inputs.release-type }}Releases/Release-Notes-${{ needs.get_version.outputs.version }}.md"
tag_name: "${{ needs.get_version.outputs.version }}"
prerelease: ${{ inputs.release-type == 'Preview' }}
draft: false

- name: Close Milestone
run: |
$tag = "${{ needs.get_version.outputs.version }}";

git config --global user.email "${{ vars.GIT_CONFIG_EMAIL }}";
git config --global user.name "Prod Release - (On behalf of Calvin Wilkinson)";

git commit --allow-empty -m "🚀${{ inputs.release-type }} Release";
git push;

git tag -a $tag -m "Production Release";
git push origin $tag;
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH }}";
$scriptUrl = $scriptUrl.Replace("\", "/").Replace("//", "/");
$scriptUrl = $scriptUrl.EndsWith("/") ? $scriptUrl.Substring(0, $scriptUrl.Length - 1) : $scriptUrl;
$scriptUrl = "$scriptUrl/close-milestone.ts";

Write-Host "::notice::Close milestone script URL: $scriptUrl";

<# Deno Args:
1. Project name
2. Milestone name - This is the version
3. PAT
#>
deno run `
--allow-read --allow-net `
"$scriptUrl" `
"${{ vars.PROJECT_NAME }}" `
"${{ needs.get_version.outputs.version }}" `
"${{ secrets.CICD_TOKEN }}";
Loading