Skip to content

Commit

Permalink
fix: attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo-COLLIN committed Jun 2, 2024
1 parent dc82d37 commit c327db2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
with:
node-version: '18'

- name: Get version from package.json
id: package_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

# --- BUILD ---
- name: Install dependencies
run: npm install
Expand All @@ -35,10 +39,6 @@ jobs:
path: releases/

# --- TAG ---
- name: Get version from package.json
id: package_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Create Tag
run: git tag v${{ steps.package_version.outputs.version }}
env:
Expand Down
45 changes: 27 additions & 18 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Get version from package.json
id: package_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
Expand All @@ -25,17 +34,17 @@ jobs:
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# configurationJson: |
# {
# "template": "#{{CHANGELOG}}\n\n**Full Changelog:** #{{RELEASE_DIFF}}",
# "pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}",
# "categories": [
# {
# "title": "## What's Changed"
# }
# ]
# }
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n**Full Changelog:** #{{RELEASE_DIFF}}",
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}",
"categories": [
{
"title": "## What's Changed"
}
]
}
# --- RELEASE ---
- name: Create Release
Expand All @@ -44,8 +53,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.ref_name }}
release_name: ⏩ v${{ github.ref_name }}
tag_name: v${{ steps.package_version.outputs.version }}
release_name: ⏩ v${{ steps.package_version.outputs.version }}
body: ${{ steps.github_release.outputs.changelog }}
draft: false
prerelease: false
Expand Down Expand Up @@ -80,8 +89,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/save-my-phind_${{ github.ref_name }}_chrome.zip
asset_name: save-my-phind_${{ github.ref_name }}_chrome.zip
asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_chrome.zip
asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_chrome.zip
asset_content_type: application/zip

- name: Upload Release Asset Firefox
Expand All @@ -90,8 +99,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/save-my-phind_${{ github.ref_name }}_firefox.zip
asset_name: save-my-phind_${{ github.ref_name }}_firefox.zip
asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_firefox.zip
asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_firefox.zip
asset_content_type: application/zip

# --- DISCUSSION ---
Expand All @@ -100,7 +109,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Release Discussion for v${{ github.ref_name }}
title: Release Discussion for v${{ steps.package_version.outputs.version }}
body: ${{ steps.github_release.outputs.changelog }}
repository-id: ${{ github.repository_id }}
category-id: Announcements
Expand Down

0 comments on commit c327db2

Please sign in to comment.