mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-04-22 00:48:45 +00:00
Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
|
cb5b30e358 | ||
|
f0a9704521 | ||
|
73fec07c28 | ||
|
dccbd17bd8 | ||
|
bc1ca37df0 | ||
|
a198449381 |
4 changed files with 33 additions and 19 deletions
|
@ -6,7 +6,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: forgejo
|
- id: forgejo
|
||||||
uses: https://code.forgejo.org/actions/setup-forgejo@v2.0.4
|
uses: https://code.forgejo.org/actions/setup-forgejo@v2.0.11
|
||||||
with:
|
with:
|
||||||
user: testuser
|
user: testuser
|
||||||
password: admin1234
|
password: admin1234
|
||||||
|
|
28
README.md
28
README.md
|
@ -37,16 +37,18 @@ Upload or download the assets of a release to a Forgejo instance.
|
||||||
Upload the release located in `release-dir` to the release section of a repository (`url` and `repo`):
|
Upload the release located in `release-dir` to the release section of a repository (`url` and `repo`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
on: [tag]
|
|
||||||
jobs:
|
jobs:
|
||||||
upload-release:
|
upload-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/forgejo-release@v2
|
- uses: actions/forgejo-release@v2.6.0
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
url: https://code.forgejo.org
|
url: https://my-forgejo-instance.net
|
||||||
|
repo: myuser/myrepo
|
||||||
|
token: ${{ secrets.WRITE_TOKEN_TO_MYREPO }}
|
||||||
|
tag: v1.0.0
|
||||||
release-dir: dist/release
|
release-dir: dist/release
|
||||||
release-notes: "MY RELEASE NOTES"
|
release-notes: "MY RELEASE NOTES"
|
||||||
```
|
```
|
||||||
|
@ -56,24 +58,24 @@ jobs:
|
||||||
Example downloading the forgejo release v1.21.4-0 into the working directory:
|
Example downloading the forgejo release v1.21.4-0 into the working directory:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
on: [tag]
|
|
||||||
jobs:
|
jobs:
|
||||||
download-release:
|
download-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/forgejo-release@v2
|
- uses: actions/forgejo-release@v2.6.0
|
||||||
with:
|
with:
|
||||||
direction: download
|
direction: download
|
||||||
url: https://code.forgejo.org
|
url: https://my-forgejo-instance.net
|
||||||
repo: forgejo/forgejo
|
repo: myuser/myrepo
|
||||||
tag: v1.21.4-0
|
token: ${{ secrets.READ_TOKEN_TO_MYREPO }}
|
||||||
|
tag: v1.0.0
|
||||||
release-dir: ./ # by default, files are downloaded into dist/release
|
release-dir: ./ # by default, files are downloaded into dist/release
|
||||||
```
|
```
|
||||||
|
|
||||||
### Real world example
|
### Real world example
|
||||||
|
|
||||||
This action is used to [publish](https://code.forgejo.org/forgejo/release-notes-assistant/src/branch/main/.forgejo/workflows/release.yml) the release notes assistant assets.
|
This action is used to [publish](https://code.forgejo.org/forgejo/release-notes-assistant/src/commit/09f2c22d80d5ee655783cfeb2c1d4bab4afec3e4/.forgejo/workflows/release.yml) the release notes assistant assets.
|
||||||
|
|
||||||
## Update the `input` section of the README
|
## Update the `input` section of the README
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends": ["local>actions/renovate-config"],
|
||||||
"local>actions/renovate-config"
|
"customManagers": [
|
||||||
]
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"description": "update example in README.md",
|
||||||
|
"fileMatch": ["^README.md$"],
|
||||||
|
"matchStrings": [
|
||||||
|
"uses: actions/forgejo-release@(?<currentValue>v\\d+\\.\\d+\\.\\d+)"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "gitea-tags",
|
||||||
|
"depNameTemplate": "actions/forgejo-release",
|
||||||
|
"versioningTemplate": "semver",
|
||||||
|
"registryUrlTemplate": "https://code.forgejo.org"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- id: forgejo
|
- id: forgejo
|
||||||
uses: https://code.forgejo.org/actions/setup-forgejo@v1.0.1
|
uses: https://code.forgejo.org/actions/setup-forgejo@v2.0.11
|
||||||
with:
|
with:
|
||||||
user: testuser
|
user: testuser
|
||||||
password: admin1234
|
password: admin1234
|
||||||
|
|
Loading…
Add table
Reference in a new issue