Skip to content

Commit

Permalink
chore: added release actions for release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalaber committed Jul 31, 2023
1 parent e6f26b9 commit f746070
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
47 changes: 45 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,51 @@ jobs:
matrix:
node-version: [18.x]
steps:
- name: Packge VSCode Extension
- uses: actions/checkout@v3
with:
token: ${{ secrets.AUTOMATION_USER_TOKEN }}
fetch-depth: 0

- uses: DevCycleHQ/release-action/prepare-release@main
id: prepare-release
with:
github-token: ${{ secrets.AUTOMATION_USER_TOKEN }}
prerelease: ${{ github.event.inputs.prerelease }}
draft: ${{ github.event.inputs.draft }}
version-increment-type: ${{ github.event.inputs.version-increment-type }}

- name: Yarn Install
run: yarn install

- name: Update version in code
run: |
yarn version ${{ '--' + github.event.inputs.version-increment-type }}
- name: Commit version change
run: |
git config --global user.email "github-tracker-bot@taplytics.com"
git config --global user.name "DevCycle Automation"
git add ./package.json
git commit -m "Release ${{steps.prepare-release.outputs.next-release-tag}}"
- name: Package VSCode Extension
run: yarn run package

- name: Publish VSCode Extension
run: |
yarn run publish ${{ github.event.inputs.version-increment-type }} -p ${{ secrets.VS_MARKETPLACE_TOKEN }}
yarn run publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }} ${{ github.event.inputs.prerelease && '--pre-release' }}
- uses: DevCycleHQ/release-action/create-release@main
id: create-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.prepare-release.outputs.next-release-tag }}
target: main
prerelease: ${{ github.event.inputs.prerelease }}
draft: ${{ github.event.inputs.draft }}
changelog: ${{ steps.prepare-release.outputs.changelog }}

- name: Display link to release
run: |
echo "::notice title=Release ID::${{ steps.create-release.outputs.release-id }}"
echo "::notice title=Release URL::${{ steps.create-release.outputs.release-url }}"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devcycle-featureflags",
"displayName": "DevCycle-FeatureFlags",
"description": "",
"version": "0.0.2",
"version": "0.0.1",
"publisher": "DevCycle",
"engines": {
"vscode": "^1.64.0"
Expand Down

0 comments on commit f746070

Please sign in to comment.