Compare commits
24 Commits
v0.0.3
...
v20250207.
| Author | SHA1 | Date | |
|---|---|---|---|
|
bd30095e45
|
|||
|
592889ea4c
|
|||
|
3a1443c153
|
|||
|
1142817d41
|
|||
|
89f0b930f5
|
|||
|
4e9bc012f9
|
|||
|
187839be20
|
|||
|
b8ac60b8a2
|
|||
|
a6278772fc
|
|||
|
64a96747be
|
|||
|
23a208387c
|
|||
|
004c5dbae7
|
|||
|
4cf7b9b0ed
|
|||
|
d89e549a2a
|
|||
|
51acb3f348
|
|||
|
328fcea7f6
|
|||
|
00fd997d75
|
|||
|
d68a7ca49d
|
|||
|
78e593fbca
|
|||
|
7a30f53dce
|
|||
|
f1a1a22939
|
|||
|
ee9a873440
|
|||
|
7ed54aa297
|
|||
|
0e9d62ccd0
|
@@ -14,36 +14,38 @@ jobs:
|
|||||||
- name: Extract tag version number
|
- name: Extract tag version number
|
||||||
id: get_version
|
id: get_version
|
||||||
uses: battila7/get-version-action@v2
|
uses: battila7/get-version-action@v2
|
||||||
- run: echo ${{ steps.get_version.outputs.version-without-v }}
|
- run: echo ${{ steps.get_version.outputs.version-without-v }} ${{ github.repository }} ${{ github.event.release.tag_name }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.release.name }}
|
||||||
- run: echo ${{ github.repository }}
|
|
||||||
- run: echo ${{ gitea.repository }}
|
|
||||||
- run: echo ${{ github.event.release.tag_name }}
|
|
||||||
|
|
||||||
# Substitute the Manifest and Download URLs in the module.json
|
# Substitute the Manifest and Download URLs in the module.json
|
||||||
- name: Substitute Manifest and Download Links For Versioned Ones
|
- name: Substitute Manifest and Download Links For Versioned Ones
|
||||||
id: sub_manifest_link_version
|
id: sub_manifest_link_version
|
||||||
uses: microsoft/variable-substitution@v1
|
uses: microsoft/variable-substitution@v1
|
||||||
with:
|
with:
|
||||||
files: 'module.json'
|
files: 'src/module.json'
|
||||||
env:
|
env:
|
||||||
version: ${{steps.get_version.outputs.version-without-v}}
|
version: ${{steps.get_version.outputs.version-without-v}}
|
||||||
url: https://gitea.ascorrea.com/${{github.repository}}
|
url: https://gitea.ascorrea.com/${{github.repository}}
|
||||||
manifest: https://gitea.ascorrea.com/${{github.repository}}/releases/latest/download/module.json
|
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
|
download: https://gitea.ascorrea.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
|
||||||
|
|
||||||
|
- run: git reflog
|
||||||
|
env:
|
||||||
|
ZIP_FILENAME: "module.zip"
|
||||||
|
DIST_BRANCH_NAME: "main"
|
||||||
|
|
||||||
# Create a zip file with all files required by the module to add to the release
|
# Create a zip file with all files required by the module to add to the release
|
||||||
- run: zip -r ./module.zip ./module.zip main.js module.json
|
- env:
|
||||||
|
ZIP_FILENAME: "module.zip"
|
||||||
|
DIST_BRANCH_NAME: "main"
|
||||||
|
run: mkdir -p dist && git archive --format zip --output dist/${ZIP_FILENAME} HEAD:src && cp src/module.json dist/ && echo \"Done!\nArchived to ${ZIP_FILENAME} and copied module.js.\"
|
||||||
|
|
||||||
|
- run: echo $(ls -lah)
|
||||||
|
|
||||||
# Create a release for this specific version
|
# Create a release for this specific version
|
||||||
- name: Update Release with Files
|
- name: Update Release with Files
|
||||||
id: create_version_release
|
id: create_version_release
|
||||||
uses: ncipollo/release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
allowUpdates: true # Set this to false if you want to prevent updating existing releases
|
files: |-
|
||||||
name: ${{ github.event.release.name }}
|
./dist/module.json
|
||||||
draft: ${{ github.event.release.unpublished }}
|
./dist/module.zip
|
||||||
prerelease: ${{ github.event.release.prerelease }}
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
artifacts: './module.json, ./module.zip'
|
|
||||||
tag: ${{ github.event.release.tag_name }}
|
|
||||||
body: ${{ github.event.release.body }}
|
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.env
|
||||||
|
.secrets
|
||||||
|
.github/
|
||||||
2
.secrets
Normal file
2
.secrets
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
TEST=123
|
||||||
|
GITHUB_TOKEN=90b74545400305cb379a38d2c442d29d3aa911a4
|
||||||
13
.vscode/tasks.json
vendored
Normal file
13
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "new release",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "TAG=$(date +\"%Y%m%d.%H%M%S\"); git add . && git commit -m \"$TAG\" && git tag \"v$TAG\" && git push origin main --tags && tea release create --title \"$TAG\" --tag=\"$TAG\"",
|
||||||
|
"problemMatcher":[]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "gitea-actions-demo",
|
"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",
|
"manifest": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/latest/module.json",
|
||||||
|
"version":"",
|
||||||
|
"url":""
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user