Skip to content

Commit

Permalink
Revise release ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Sep 3, 2024
1 parent ff8ef21 commit 6865c4a
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 20 deletions.
88 changes: 87 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,46 @@ jobs:
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Get previous release tag
id: prev_release
uses: actions/github-script@v6
with:
script: |
const { data: releases } = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
});
if (releases.length > 0) {
return releases[0].tag_name;
} else {
return null;
}
- name: Get commits since last release
id: commits
uses: actions/github-script@v6
with:
script: |
const previousTag = steps.prev_release.outputs.result;
let commits;
if (previousTag) {
const { data } = await github.repos.compareCommits({
owner: context.repo.owner,
repo: context.repo.repo,
base: previousTag,
head: 'HEAD',
});
commits = data.commits;
} else {
const { data } = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
sha: 'HEAD',
});
commits = data;
}
return commits.map(commit => `- ${commit.commit.message} (${commit.sha})`).join('\n');
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -219,6 +259,52 @@ jobs:
tag_name: v${{ env.VERSION }}
release_name: v${{ env.VERSION }}
body: |
Changes in this Release
${{ steps.commits.outputs.result }}
draft: true
prerelease: false

- name: Download build artifacts (macos x64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-macos-x64
path: artifacts

- name: Download build artifacts (macos arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-macos-arm64
path: artifacts

- name: Download build artifacts (linux x64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-linux-x64
path: artifacts

- name: Download build artifacts (linux arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-linux-arm64
path: artifacts

- name: Download build artifacts (windows x64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-windows-x64
path: artifacts

- name: Download build artifacts (windows arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-windows-arm64
path: artifacts

- name: Upload release assets
run: |
for file in $(find artifacts/ -type f); do
echo "Uploading $(basename "$file")"
gh release upload ${{ steps.create_release.outputs.upload_url }} "$file" --clobber
done
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
shell: bash
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<p align="center"><a href="https://comet.thavarshan.com" target="_blank"><img src="./src/assets/images/demo.gif" width="600" alt="Comet Demo"></a></p>

[![Release](https://github.com/stellar-comet/comet/actions/workflows/release.yml/badge.svg?branch=release&event=release)](https://github.com/stellar-comet/comet/actions/workflows/release.yml)

## Project Overview

Comet's goal is to provide a free, user-friendly, and visually appealing application for converting video files. Whether you need to convert a single video or multiple files at once, Comet is here to help.
Expand Down
2 changes: 1 addition & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const config: ForgeConfig = {
platforms: ['win32'],
config: {
packageName: 'JeromeThayananthajothy.CometApp',
packageDisplayName: productName,
packageDisplayName: `${productName}App`,
packageDescription: description,
packageVersion: `${version}.0`,
publisher: 'CN=E0D72A6F-3D67-49D6-9EA4-99FAFB4620E5',
Expand Down
Loading

0 comments on commit 6865c4a

Please sign in to comment.