Skip to content

Commit

Permalink
ci(release): private rc releases
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Apr 25, 2024
1 parent 081853e commit bac210e
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -2,11 +2,19 @@ name: Release

on:
push:
branches: master
branches: [master, develop]

permissions:
contents: write

jobs:
release:
name: Release
if: (
github.repository_owner == 'pvtnbr' && github.ref_name =='develop'
) || (
github.repository_owner == 'privatenumber' && github.ref_name =='master'
)
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -28,8 +36,22 @@ jobs:
- name: Lint
run: pnpm lint

- name: Prerelease to GitHub
if: github.repository_owner == 'pvtnbr'
run: |
jq '
.publishConfig.registry = "https://npm.pkg.github.com"
| .name = ("@" + env.GITHUB_REPOSITORY_OWNER + "/" + .name)
| .repository = env.GITHUB_REPOSITORY
| .release.branches = [
"master",
{ name: "develop", prerelease: "rc", channel: "latest" }
]
' package.json > _package.json
mv _package.json package.json
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpx semantic-release
run: pnpm dlx semantic-release

0 comments on commit bac210e

Please sign in to comment.