Merge pull request #106 from advanced-security/juxtin/prep-412
Update version to 4.1.2 and update release instructions
This commit is contained in:
@@ -1,126 +0,0 @@
|
||||
name: Release
|
||||
|
||||
run-name: Release ${{ inputs.version }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
name: Build and test
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Build and Test
|
||||
run: |
|
||||
npm ci
|
||||
npm run test --if-present
|
||||
npm run build --if-present
|
||||
npm run build-exe --if-present
|
||||
|
||||
# - name: Check that build is clean
|
||||
# run: |
|
||||
# git diff --exit-code
|
||||
|
||||
|
||||
validate_version:
|
||||
name: Validate version number
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Process version number as SemVer
|
||||
id: semver
|
||||
uses: peter-murray/semver-data-action@v1
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
|
||||
release:
|
||||
name: Release
|
||||
|
||||
needs:
|
||||
- validate_version
|
||||
- build_and_test
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Process version number as SemVer
|
||||
id: semver
|
||||
uses: peter-murray/semver-data-action@v1
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set git user
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Version application
|
||||
run: |
|
||||
npm version ${{ steps.semver.outputs.semver }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm ci
|
||||
npm run build --if-present
|
||||
npm run build-exe --if-present
|
||||
|
||||
- name: Check that build is clean
|
||||
id: clean_build
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git diff --exit-code
|
||||
|
||||
- name: Update release
|
||||
if: steps.clean_build.outcome == 'failure'
|
||||
run: |
|
||||
git add .
|
||||
git commit -m "chore: Updating release files"
|
||||
|
||||
- name: Update tags
|
||||
if: steps.semver.outputs.isPreRelease == 'false'
|
||||
run: |
|
||||
git tag "v${{ steps.semver.outputs.semver }}" --force
|
||||
git tag "v${{ steps.semver.outputs.major }}" --force
|
||||
git tag "v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}" --force
|
||||
git tag "v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}.${{ steps.semver.outputs.patch }}" --force
|
||||
|
||||
git push origin ${{ github.ref_name }}
|
||||
git push origin --tags --force
|
||||
|
||||
- name: Attach CLI artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cli
|
||||
path: cli
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1.13.0
|
||||
with:
|
||||
artifacts: cli/*
|
||||
prerelease: ${{ steps.semver.outputs.isPreRelease }}
|
||||
tag: v${{ steps.semver.outputs.semver }}
|
||||
@@ -24,6 +24,46 @@ Here are a few things you can do that will increase the likelihood of your pull
|
||||
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
||||
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
||||
|
||||
## Cutting a new release
|
||||
|
||||
<details>
|
||||
|
||||
_Note: these instructions are for maintainers_
|
||||
|
||||
1. Update the version number in [package.json](https://github.com/advanced-security/maven-dependency-submission-action/blob/main/package.json) and run `npm i` to update the lockfile. This is also a good time to make sure that the `dist/index.js` file is up to date by running `npm run build`.
|
||||
2. Go to [Draft a new
|
||||
release](https://github.com/advanced-security/maven-dependency-submission-action/releases/new)
|
||||
in the Releases page.
|
||||
3. Make sure that the `Publish this Action to the GitHub Marketplace`
|
||||
checkbox is enabled
|
||||
|
||||
<img width="481" alt="Screenshot 2022-06-15 at 12 08 19" src="https://user-images.githubusercontent.com/2161/173822484-4b60d8b4-c674-4bff-b5ff-b0c4a3650ab7.png">
|
||||
|
||||
4. Click "Choose a tag" and then "Create new tag", where the tag name
|
||||
will be your version prefixed by a `v` (e.g. `v4.1.2`).
|
||||
5. Use a version number for the release title (e.g. "4.1.2").
|
||||
|
||||
<img width="700" alt="Screenshot 2022-06-15 at 12 08 36" src="https://user-images.githubusercontent.com/2161/173822548-33ab3432-d679-4dc1-adf8-b50fdaf47de3.png">
|
||||
|
||||
6. Add your release notes. If this is a major version make sure to
|
||||
include a small description of the biggest changes in the new version.
|
||||
7. Click "Publish Release".
|
||||
|
||||
You now have a tag and release using the semver version you used
|
||||
above. The last remaining thing to do is to move the dynamic version
|
||||
identifier to match the current SHA. This allows users to adopt a
|
||||
major version number (e.g. `v1`) in their workflows while
|
||||
automatically getting all the
|
||||
minor/patch updates.
|
||||
|
||||
To do this just checkout `main`, force-create a new annotated tag, and push it:
|
||||
|
||||
```
|
||||
git tag -fa v4 -m "Updating v4 to 4.1.2"
|
||||
git push origin v4 --force
|
||||
```
|
||||
</details>
|
||||
|
||||
## Resources
|
||||
|
||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "maven-dependency-submission-action",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "maven-dependency-submission-action",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "maven-dependency-submission-action",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"description": "Submit Maven dependencies to GitHub dependency submission API",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user