mirror of
https://github.com/oblakstudio/wp-plugin-installer.git
synced 2025-11-13 14:05:53 +08:00
fix(CI): Fixed release workflow
This commit is contained in:
parent
d772da1660
commit
e34702944c
2 changed files with 58 additions and 11 deletions
38
.github/workflows/release.yml
vendored
38
.github/workflows/release.yml
vendored
|
|
@ -1,9 +1,12 @@
|
|||
name: Release
|
||||
name: CI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- alpha
|
||||
- beta
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
|
|
@ -13,13 +16,26 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.OBLAK_BOT_TOKEN }}
|
||||
- name: Publish a composer package
|
||||
uses: better-php-actions/publish-composer-package@v1
|
||||
token: ${{ secrets.OBLAKBOT_PAT }}
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
id: gpg
|
||||
with:
|
||||
package_slug: "wp-plugin-installer"
|
||||
package_name: "WP Plugin Installer"
|
||||
with_gpg: true
|
||||
gpg_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
release_token: ${{ secrets.OBLAK_BOT_TOKEN }}
|
||||
gpg_private_key: ${{ secrets.OBLAKBOT_GPG_KEY }}
|
||||
passphrase: ${{ secrets.OBLAKBOT_GPG_PASS }}
|
||||
git_config_global: true
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- name: Semantic Release
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
with:
|
||||
extra_plugins: |
|
||||
conventional-changelog-conventionalcommits
|
||||
@semantic-release/github
|
||||
@semantic-release/exec
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ steps.gpg.outputs.name}}
|
||||
GIT_AUTHOR_EMAIL: ${{ steps.gpg.outputs.email}}
|
||||
GIT_COMMITTER_NAME: ${{ steps.gpg.outputs.name}}
|
||||
GIT_COMMITTER_EMAIL: ${{ steps.gpg.outputs.email}}
|
||||
GITHUB_TOKEN: ${{ secrets.OBLAKBOT_PAT }}
|
||||
|
|
|
|||
31
.releaserc
Normal file
31
.releaserc
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"branches": [
|
||||
"master",
|
||||
{
|
||||
"name": "beta",
|
||||
"prerelease": true
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "zip -r '/tmp/release.zip' ./src README.md ./composer.json"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
"assets": [
|
||||
{
|
||||
"path": "/tmp/release.zip",
|
||||
"name": "wp-plugin-installer-v${nextRelease.version}.zip",
|
||||
"label": "WP Plugin Installer v${nextRelease.version}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue