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

Automate changelog in GH action #1680

Closed
wants to merge 4 commits into from
Closed
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
18 changes: 18 additions & 0 deletions .github/workflows/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"categories": [
{
"title": "### 🚀 New Features and Enhancements",
"labels": ["product"]
},
{
"title": "### 🐛 Bug Fixes",
"labels": ["bug"]
},
{
"title": "### 🔨 Maintenance",
"labels": [":house: housekeeping"]
}
],
"pr_template": "- ${{TITLE}} [#${{NUMBER}}](https://github.com/iterative/vscode-dvc/pull/${{NUMBER}}) by [@${{AUTHOR}}](https://github.com/${{AUTHOR}})",
"max_pull_requests": 2000
}
43 changes: 34 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Publish Extension

on: workflow_dispatch
on:
workflow_dispatch:
pull_request:

jobs:
deploy:
Expand All @@ -10,19 +12,42 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'

- run: yarn run install-frozen-lockfile
- run: yarn build
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
- name: Build Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
extensionFile: './extension/dvc.vsix'
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
configuration: '.github/workflows/changelog-configuration.json'
toTag: 'main'
fromTag: 'd29bc91581b848905fc6d210b6030aeecc8ff3a3'
- name: view new Changelog
run: echo "${{ steps.changelog.outputs.changelog }}"

# - run: yarn run install-frozen-lockfile
# - run: yarn build
# - name: Publish to Visual Studio Marketplace
# uses: HaaLeo/publish-vscode-extension@v1
# with:
# extensionFile: './extension/dvc.vsix'
# pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
# registryUrl: https://marketplace.visualstudio.com

# - name: Bump Version after Release
# uses: 'phips28/gh-action-bump-version@master'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PACKAGEJSON_DIR: 'extension'
# with:
# target-branch: 'main'
# commit-message:
# 'CI: increment version to {{version}} after release [skip ci]'
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Change Log

## 0.2.12 2022-05-06
## 0.2.13 2022-05-10

- Placeholder Release
2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"extensionDependencies": [
"vscode.git"
],
"version": "0.2.12",
"version": "0.2.11",
"license": "Apache-2.0",
"readme": "./README.md",
"repository": {
Expand Down