Compare commits
21 Commits
20250207.0
...
v20250207.
| Author | SHA1 | Date | |
|---|---|---|---|
|
4f0513c72c
|
|||
|
5e064a8dfb
|
|||
|
d0101c9666
|
|||
|
fc88596821
|
|||
|
859339b403
|
|||
|
2dd53178cf
|
|||
|
d4b5c3fe66
|
|||
|
6ac5ceb26a
|
|||
|
a4a5a97fd6
|
|||
|
bd30095e45
|
|||
|
592889ea4c
|
|||
|
3a1443c153
|
|||
|
1142817d41
|
|||
|
89f0b930f5
|
|||
|
4e9bc012f9
|
|||
|
187839be20
|
|||
|
b8ac60b8a2
|
|||
|
a6278772fc
|
|||
|
64a96747be
|
|||
|
23a208387c
|
|||
|
004c5dbae7
|
@@ -14,14 +14,13 @@ jobs:
|
||||
- name: Extract tag version number
|
||||
id: get_version
|
||||
uses: battila7/get-version-action@v2
|
||||
- run: echo ${{ steps.get_version.outputs.version-without-v }} ${{ github.repository }} ${{ github.event.release.tag_name }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.release.name }}
|
||||
|
||||
# Substitute the Manifest and Download URLs in the module.json
|
||||
- name: Substitute Manifest and Download Links For Versioned Ones
|
||||
id: sub_manifest_link_version
|
||||
uses: microsoft/variable-substitution@v1
|
||||
with:
|
||||
files: 'module.json'
|
||||
files: 'src/module.json'
|
||||
env:
|
||||
version: ${{steps.get_version.outputs.version-without-v}}
|
||||
url: https://gitea.ascorrea.com/${{github.repository}}
|
||||
@@ -29,9 +28,19 @@ jobs:
|
||||
download: https://gitea.ascorrea.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
|
||||
|
||||
# Create a zip file with all files required by the module to add to the release
|
||||
- run: zip -r ./module.zip module.json src
|
||||
- run: echo "Files- $(ls -la ${{ github.workspace }})"
|
||||
- run: echo "secret- `${{ secrets.TEST }}`"
|
||||
- name: Create files (module.zip, module.json) for release
|
||||
run: >
|
||||
mkdir -p dist
|
||||
&& git archive --format zip --output dist/module.zip HEAD:src
|
||||
&& cp src/module.json dist/
|
||||
&& echo \"Done!\nArchived to ${ZIP_FILENAME} and copied module.js.\"
|
||||
|
||||
- name: Setting commit message
|
||||
id: commit-message
|
||||
run: >
|
||||
COMMIT_MESSAGE=$(git log -1 --pretty=%B);
|
||||
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> "$GITHUB_OUTPUT"
|
||||
&& echo "commit message is '$COMMIT_MESSAGE'"
|
||||
|
||||
# Create a release for this specific version
|
||||
- name: Update Release with Files
|
||||
@@ -39,5 +48,7 @@ jobs:
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
files: |-
|
||||
./module.json
|
||||
./module.zip
|
||||
./dist/module.json
|
||||
./dist/module.zip
|
||||
body: |-
|
||||
${{ steps.commit-message.outputs.COMMIT_MESSAGE }}
|
||||
49
.github/workflows/main.yml
vendored
49
.github/workflows/main.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Release Creation
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# get part of the tag after the `v`
|
||||
- name: Extract tag version number
|
||||
id: get_version
|
||||
uses: battila7/get-version-action@v2
|
||||
- run: echo ${{ steps.get_version.outputs.version-without-v }} ${{ github.repository }} ${{ github.event.release.tag_name }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.release.name }}
|
||||
|
||||
# Substitute the Manifest and Download URLs in the module.json
|
||||
- name: Substitute Manifest and Download Links For Versioned Ones
|
||||
id: sub_manifest_link_version
|
||||
uses: microsoft/variable-substitution@v1
|
||||
with:
|
||||
files: 'module.json'
|
||||
env:
|
||||
version: ${{steps.get_version.outputs.version-without-v}}
|
||||
url: https://gitea.ascorrea.com/${{github.repository}}
|
||||
manifest: https://gitea.ascorrea.com/${{github.repository}}/releases/latest/download/module.json
|
||||
download: https://gitea.ascorrea.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
|
||||
|
||||
# Create a zip file with all files required by the module to add to the release
|
||||
- run: zip -r ./module.zip module.json src
|
||||
- run: echo "Files- $(ls -la ${{ github.workspace }})"
|
||||
- run: echo "secret- `${{ secrets.TEST }}`"
|
||||
|
||||
# Create a release for this specific version
|
||||
- name: Update Release with Files
|
||||
id: create_version_release
|
||||
uses: ncipollo/release-action@v1.15.0
|
||||
with:
|
||||
allowUpdates: true # Set this to false if you want to prevent updating existing releases
|
||||
name: ${{ github.event.release.name }}
|
||||
draft: ${{ github.event.release.unpublished }}
|
||||
prerelease: ${{ github.event.release.prerelease }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
artifacts: '${{ github.workspace }}/module.json, ${{ github.workspace }}/module.zip'
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
body: ${{ github.event.release.body }}
|
||||
title: ${{ github.event.release.tag_name }}
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.env
|
||||
.secrets
|
||||
.github/
|
||||
19
.vscode/tasks.json
vendored
Normal file
19
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "commit and new release",
|
||||
"type": "shell",
|
||||
"command": "TAG=$(date +\"%Y%m%d.%H%M%S\"); git add . && git commit -m \"$TAG\" && git push origin main && tea release create --title \"$TAG\" --tag=\"v$TAG\"",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "new release",
|
||||
"type": "shell",
|
||||
"command": "TAG=$(date +\"%Y%m%d.%H%M%S\"); git push origin main && tea release create --title \"$TAG\" --tag=\"v$TAG\"",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"name": "gitea-actions-demo",
|
||||
"download": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/v0.2.1/module.zip",
|
||||
"download": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/v/module.zip",
|
||||
"manifest": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/latest/module.json",
|
||||
"version":"",
|
||||
"url":""
|
||||
}
|
||||
Reference in New Issue
Block a user