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

🌱 adding changelog func #86

Merged
merged 9 commits into from
Nov 18, 2024
33 changes: 22 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
tag_name:
description: "Enter Tag for the release"
required: true

prerelease:
description: "Is this a pre-release?"
required: true
Expand Down Expand Up @@ -45,7 +44,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"
node-version-file: ".nvmrc"

- name: Determine the tag
id: determine_tag
Expand All @@ -58,30 +57,23 @@ jobs:
shell: bash

- name: Install dependencies
working-directory: ./vscode
run: npm ci

# Run tests on Linux
# Run tests on different OSes
- name: Run tests (Linux)
if: matrix.arch == 'linux'
working-directory: ./vscode
run: xvfb-run -a npm run test

# Run tests on macOS
- name: Run tests (macOS)
if: matrix.arch == 'macos'
working-directory: ./vscode
run: npm test

# Run tests on Windows
- name: Run tests (Windows)
if: matrix.arch == 'windows'
working-directory: ./vscode
shell: cmd
run: npm test

- name: Build Package
working-directory: ./vscode
run: npm run package

- name: Generate .vsix package
rszwajko marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -96,14 +88,32 @@ jobs:
name: vscode-extension-${{ matrix.arch }}
path: ./vscode/*.vsix

generate_changelog:
name: Generate Changelog
needs: release_prereq
uses: konveyor/release-tools/.github/workflows/generate-changelog.yml@main
with:
version: ${{ needs.release_prereq.outputs.tag_name }}
prev_version: $(gh api repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')
repository: ${{ github.repository }}
ref: ${{ github.sha }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Final Release
runs-on: ubuntu-latest
needs: release_prereq
needs: [release_prereq, generate_changelog]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download Changelog Artifact
uses: actions/download-artifact@v4
with:
name: changelog-artifact
path: ./artifacts

- name: List available artifacts
run: |
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
Expand Down Expand Up @@ -142,6 +152,7 @@ jobs:
with:
tag: ${{ needs.release_prereq.outputs.tag_name }}
commit: ${{ github.sha }}
bodyFile: ./artifacts/release.md
artifacts: |
./artifacts/konveyor-linux-*.vsix
./artifacts/konveyor-macos-*.vsix
Expand Down
Loading