Skip to content

Draft release

Draft release #32

Workflow file for this run

name: Draft release
on:
workflow_dispatch:
inputs:
semver_release_type:
description: SemVer Level for this Release
required: true
default: patch
type: choice
options:
- patch
- minor
- major
jobs:
update-version:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20.x"
- name: Build and Bundle Static Exports
working-directory: ./packages/stencil-library
id: build-and-bundle
run: |
npm install
npm run build
# - name: Run Tests
# id: run-tests
# run: |
# npm test
- name: Build and Bundle React Exports
working-directory: ./packages/react-library
id: build-and-bundle

Check failure on line 37 in .github/workflows/draft-release.yml

View workflow run for this annotation

GitHub Actions / Draft release

Invalid workflow file

The workflow is not valid. .github/workflows/draft-release.yml (Line: 37, Col: 13): The identifier 'build-and-bundle' may not be used more than once within the same scope.
run: |
npm install
npm run build
# - name: Run Tests
# id: run-tests
# run: |
# npm test
- name: Bump and commit new version
id: bump_version
run: |
git config --global user.email "<>"
git config --global user.name "NJWDS Components Draft Release Action"
NEW_VERSION=$(npm version ${{ inputs.semver_release_type }} --no-git-tag-version)
git add -A
git commit -m "Bump version to $NEW_VERSION"
git push
RELEASE_SHA=$(git rev-parse HEAD)
echo ::set-output name=new_version::$NEW_VERSION
echo ::set-output name=release_sha::$RELEASE_SHA
outputs:
new_version: ${{ steps.bump_version.outputs.new_version }}
release_sha: ${{ steps.bump_version.outputs.release_sha }}
draft-release:
needs: update-version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-version.outputs.release_sha }}
- run: |
gh release create ${{ needs.update-version.outputs.new_version }} \
--draft \
--generate-notes \
--target ${{ needs.update-version.outputs.release_sha }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}