Skip to content

Commit

Permalink
Use ncipollo/release-action@v1 to release (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest authored Jan 10, 2023
1 parent 9dc5acd commit fe290a6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 46 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/auto-git-release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,26 @@ jobs:
echo "current_commit: ${{steps.next_semantic_version.outputs.current_commit}}"
- name: Creating Git release tag for the "${{steps.next_semantic_version.outputs.version_tag}}" version
uses: softprops/action-gh-release@v1
uses: ncipollo/release-action@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: ${{steps.next_semantic_version.outputs.version_tag}}
tag: ${{steps.next_semantic_version.outputs.version_tag}}
name: "Automatic release ${{steps.next_semantic_version.outputs.version_tag}}"
makeLatest: true
allowUpdates: false
prerelease: false
generate_release_notes: true
files: |
CHANGELOG.md
- name: Updating Git release tag for "latest" version
uses: softprops/action-gh-release@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: latest
name: "Latest release (auto-update) - UNSAFE for production usage"
prerelease: false
generate_release_notes: true
files: |
generateReleaseNotes: true
artifacts: |
CHANGELOG.md
- name: Updating Git release tag for the major "v${{steps.next_semantic_version.outputs.major}}" version
uses: softprops/action-gh-release@v1
uses: ncipollo/release-action@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "v${{steps.next_semantic_version.outputs.major}}"
tag: "v${{steps.next_semantic_version.outputs.major}}"
name: "v${{steps.next_semantic_version.outputs.major}} latest release (auto-update)"
allowUpdates: true
prerelease: false
generate_release_notes: true
files: |
generateReleaseNotes: true
artifacts: |
CHANGELOG.md
- name: Release on GitHub Actions Marketplace
uses: Actions-R-Us/actions-tagger@v2.0.3
with:
token: "${{ github.token }}"
29 changes: 10 additions & 19 deletions .github/workflows/auto-git-release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,25 @@ jobs:
echo "current_commit: ${{steps.next_semantic_version.outputs.current_commit}}"
- name: Creating Git release tag for the "v${{steps.next_semantic_version.outputs.version}}" version
uses: softprops/action-gh-release@v1
uses: ncipollo/release-action@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "v${{steps.next_semantic_version.outputs.version}}"
tag: "v${{steps.next_semantic_version.outputs.version}}"
name: "Automatic release v${{steps.next_semantic_version.outputs.version}}"
allowUpdates: false
prerelease: true
generate_release_notes: true
files: |
CHANGELOG.md
- name: Updating Git release tag for "latest-rc" version
uses: softprops/action-gh-release@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: latest-rc
name: "Latest release (auto-update) - UNSAFE for production usage"
prerelease: true
generate_release_notes: true
files: |
generateReleaseNotes: true
artifacts: |
CHANGELOG.md
- name: Updating Git release tag for the major "v${{steps.next_semantic_version.outputs.major}}-rc" version
uses: softprops/action-gh-release@v1
uses: ncipollo/release-action@v1
with: # See https://github.com/softprops/action-gh-release#-customizing
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "v${{steps.next_semantic_version.outputs.major}}-rc"
tag: "v${{steps.next_semantic_version.outputs.major}}-rc"
name: "v${{steps.next_semantic_version.outputs.major}}-rc latest release (auto-update)"
allowUpdates: true
prerelease: true
generate_release_notes: true
files: |
generateReleaseNotes: true
artifacts: |
CHANGELOG.md
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ Our versioning process is completely automated, any changes landing on the `main
## Releases versions:

The examples above use an auto-updated major version tag (`@v1`).
It is also possible to use the `@latest` and `@latest-rc` tags. (RC stands for "Release candidate", which is similar to
a Beta version)
It is also possible to use the `@latest` tag. (RC stands for "Release candidate", which is similar to a Beta version)

While those options can be useful, we intend to give some "production-grade" best practices.

Expand All @@ -262,7 +261,6 @@ production-grade" best practices.
- `@{MAJOR}-rc`, e.g: `@v1-rc`, **reserved for development mode**, useful when debugging on a specific prerelease
version (UNSAFE)
- `@latest`, **reserved for development mode**, useful when debugging (UNSAFE)
- `@latest-rc`, **reserved for development mode**, useful when debugging on prerelease versions (UNSAFE)

**"But, what is the issue with the `@{MAJOR}-{MINOR}-{PATCH}` way to pin a specific version"?**

Expand Down

0 comments on commit fe290a6

Please sign in to comment.