Skip to content

Commit

Permalink
Testing changes to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
apexskier committed Dec 26, 2023
1 parent 53bcac9 commit a7fc434
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4

Expand All @@ -27,15 +30,15 @@ jobs:

- name: Tag
if: ${{ !steps.semver.outputs.prerelease && steps.semver.outputs.version }}
uses: richardsimko/[email protected].4
uses: richardsimko/[email protected].11
with:
tag_name: ${{ format('v{0}', steps.semver.outputs.major) }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Tag latest
if: ${{ !steps.semver.outputs.prerelease && steps.semver.outputs.version }}
uses: richardsimko/[email protected].4
uses: richardsimko/[email protected].11
with:
tag_name: latest
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Get the version
id: version
Expand All @@ -22,10 +25,7 @@ jobs:

- name: Release
if: ${{ steps.semver.outputs.version }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.VERSION }}
release_name: ${{ steps.version.outputs.VERSION }}
prerelease: ${{ !!steps.semver.outputs.prerelease }}
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

Create a new tag, following semver and prefixed with `v`. On push, workflows will create associated tags and releases. After the release is created, edit it through GitHub and make sure "Publish this Action to the GitHub Marketplace" is checked.

## Credential creation

`DEPENDABOT_GITHUB_TOKEN`:

* Actions: Access: Read and write
* Contents: Access: Read and write
* Metadata: Access: Read-only

## Notes

I use `.split(search).join(replace)` instead of `.replace(search, replace)` to avoid unintentional behavior to to `.replace`'s [replacement string semantics](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_the_replacement).

0 comments on commit a7fc434

Please sign in to comment.