Skip to content

ci: do not use hardcoded default branch #20

ci: do not use hardcoded default branch

ci: do not use hardcoded default branch #20

---

Check failure on line 1 in .github/workflows/semantic-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/semantic-release.yml

Invalid workflow file

(Line: 6, Col: 9): Unrecognized named-value: 'github'. Located at position 1 within expression: github.event.repository.default_branch
name: Semantic release
on:
push:
branches:
- "${{ github.event.repository.default_branch }}"
jobs:
build:
name: Semantic release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: "${{ secrets.SEMANTIC_RELEASE_APP_ID }}"
private-key: "${{ secrets.SEMANTIC_RELEASE_PRIVATE_KEY }}"
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_ACTION: "yes"
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
HACKAGE_KEY: "${{ secrets.HACKAGE_TOKEN }}"
with:
ci: ${{ github.ref == github.event.repository.default_branch }}
extra_plugins: |
conventional-changelog-conventionalcommits
semantic-release-mirror-version
semantic-release-stack-upload
- name: Semantic release output
run: |
echo ref: ${{ github.ref }}
echo dry_run: ${{ github.ref_name != github.event.repository.default_branch }}
echo published: ${{ steps.semantic.outputs.new_release_published }}
echo last_release: ${{ steps.semantic.outputs.last_release_version }}
echo new_version: ${{ steps.semantic.outputs.new_release_version }}
echo git_head: ${{ steps.semantic.outputs.new_release_git_head }}
echo release_notes:
echo "${{ steps.semantic.outputs.new_release_notes }}"
...