Cleanup action for release (#56)
* Removed empty try catch * Initial commit * Compiled to js * Escape slash for nodejs * Updating getStableHelmVersion test * Removing old versions of run * Added comment on getLatestHelmVersion and variable for helm release url to command * Pushing recent changes before computer reset * Latest getLatestHelmVersion iteration * Removed test * Testing async test * getLatestHelmVersion refactor * fixed method to access helm releses JSON * Edited comment on isValidVersion * Removed old integration tests * Small temp test * Removed IntegrationTests path * Updated package-lock.json and removed unused dep * Integration testing * Fixed if statement in run command * Added exit * Double brackets for new test * Added version confirmation output and different check for version * Helm 3.7.2 test * added env to workflow paths * adjusted env in workflow paths * 3.5.0 tests * Requested changes * Fixed downloadHelm test * Clean up for release * Updated CODEOWNERS * Updated CODEOWNERS
This commit is contained in:
55
.github/workflows/release-pr.yml
vendored
Normal file
55
.github/workflows/release-pr.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: "Create release PR"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release:
|
||||
description: "Define release version (ex: v1, v2, v3)"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
createPullRequest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check if remote branch exists
|
||||
env:
|
||||
BRANCH: releases/${{ github.event.inputs.release }}
|
||||
run: |
|
||||
echo "##[set-output name=exists;]$(echo $(if [[ -z $(git ls-remote --heads origin ${BRANCH}) ]]; then echo false; else echo true; fi;))"
|
||||
id: extract-branch-status
|
||||
# these two only need to occur if the branch exists
|
||||
- name: Checkout proper branch
|
||||
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
|
||||
env:
|
||||
BRANCH: releases/${{ github.event.inputs.release }}
|
||||
run: git checkout ${BRANCH}
|
||||
- name: Reset promotion branch
|
||||
if: ${{ steps.extract-branch-status.outputs.exists == 'true' }}
|
||||
run: |
|
||||
git fetch origin master:master
|
||||
git reset --hard master
|
||||
- name: Install packages
|
||||
run: |
|
||||
rm -rf node_modules/
|
||||
npm install --no-bin-links
|
||||
npm run build
|
||||
- name: Remove node_modules from gitignore
|
||||
run: |
|
||||
sed -i '/node_modules/d' ./.gitignore
|
||||
- name: Create branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: releases/${{ github.event.inputs.release }}
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Add node modules and new code for release
|
||||
title: ${{ github.event.inputs.release }} new release
|
||||
base: releases/${{ github.event.inputs.release }}
|
||||
branch: create-release
|
Reference in New Issue
Block a user