@@ -1,20 +0,0 @@
|
|||||||
name: Core Build (push)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
|
||||||
ACTI_BOT_TOKEN: ${{ secrets.ACTI_BOT_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
self-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- run: touch text.txt
|
|
||||||
- uses: https://source.vague.tech/open-vague/ci-actions/publish@feature/1-publish
|
|
||||||
with:
|
|
||||||
file: text.txt
|
|
||||||
package: a-proper-test-package
|
|
||||||
version: master
|
|
||||||
force: true
|
|
||||||
@@ -25,3 +25,23 @@ Publishes a `generic` package to current Gitea instance. Example:
|
|||||||
* `package` - the package name
|
* `package` - the package name
|
||||||
* `version` - the package version, need to be unique (unless force flag is set)
|
* `version` - the package version, need to be unique (unless force flag is set)
|
||||||
* `force` - false by default; if set **deletes the whole version** of the package (all files) and then publishes instead with the same version
|
* `force` - false by default; if set **deletes the whole version** of the package (all files) and then publishes instead with the same version
|
||||||
|
|
||||||
|
## Releasae
|
||||||
|
|
||||||
|
Create a tag and a release (if tag is not present) or a release for an existing tag.
|
||||||
|
|
||||||
|
The current implementation does not support moving tags, so version should be unique within the repo.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- id: create-release
|
||||||
|
uses: https://source.vague.tech/open-vague/ci-actions/release@feature/3-release
|
||||||
|
with:
|
||||||
|
name: Initial release
|
||||||
|
version: v0.1.0
|
||||||
|
- run: |
|
||||||
|
echo "Id: ${{ steps.create-release.outputs.release_id }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
* `name` - release name
|
||||||
|
* `body` - release notes (or description)
|
||||||
|
* `version` - tag name
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: create a release
|
||||||
|
description: create gitea release (creating tag or for existing one)
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: release name
|
||||||
|
required: true
|
||||||
|
notes:
|
||||||
|
description: release notes
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
version:
|
||||||
|
description: release version
|
||||||
|
required: true
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
release_id:
|
||||||
|
description: release id if created successfully
|
||||||
|
value: ${{ steps.create-release.outputs.id }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- id: create-release
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
RESPONSE=$(curl --fail-with-body -X POST -H "Authorization: token ${ACTI_BOT_TOKEN}" -H "Content-Type: application/json" \
|
||||||
|
-d "{\"draft\": false, \"prerelease\": false, \"body\": \"${{ inputs.body }}\", \"tag_name\": \"${{ inputs.version }}\", \"name\": \"${{ inputs.name }}\"}" \
|
||||||
|
${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases)
|
||||||
|
echo "id=$(echo "$RESPONSE" | jq -r .id)" >> "$GITEA_OUTPUT"
|
||||||
Reference in New Issue
Block a user