Compare commits
11 Commits
v20250207.
...
v20250207.
| Author | SHA1 | Date | |
|---|---|---|---|
|
859339b403
|
|||
|
2dd53178cf
|
|||
|
d4b5c3fe66
|
|||
|
6ac5ceb26a
|
|||
|
a4a5a97fd6
|
|||
|
bd30095e45
|
|||
|
592889ea4c
|
|||
|
3a1443c153
|
|||
|
1142817d41
|
|||
|
89f0b930f5
|
|||
|
4e9bc012f9
|
@@ -14,32 +14,31 @@ 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}}
|
||||
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
|
||||
|
||||
- run: echo zip filename "$ZIP_FILENAME" dist_branch "$DIST_BRANCH_NAME"
|
||||
env:
|
||||
ZIP_FILE_NAME: "module.zip"
|
||||
DIST_BRANCH_NAME: "main"
|
||||
|
||||
# Create a zip file with all files required by the module to add to the release
|
||||
- env:
|
||||
ZIP_FILE_NAME: "module.zip"
|
||||
DIST_BRANCH_NAME: "main"
|
||||
run: mkdir -p dist && git archive --format zip --output dist/${ZIP_FILENAME} ${DIST_BRANCH_NAME}:src && cp src/module.json dist/ && echo \"Done!\nArchived to ${ZIP_FILENAME} and copied module.js.\"
|
||||
- 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.\"
|
||||
|
||||
- run: echo $(ls -lah)
|
||||
- name: Setting commit message
|
||||
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B)" >> "$GITHUB_ENV" && echo "COMMIT MESSAGE IS `$COMMIT_MSG`"
|
||||
- name: Retrieve commit message
|
||||
run: echo "${{ env.COMMIT_MESSAGE }}"
|
||||
|
||||
# Create a release for this specific version
|
||||
- name: Update Release with Files
|
||||
@@ -49,3 +48,4 @@ jobs:
|
||||
files: |-
|
||||
./dist/module.json
|
||||
./dist/module.zip
|
||||
body: ${{ env.COMMIT_MESSAGE }}
|
||||
10
.vscode/tasks.json
vendored
10
.vscode/tasks.json
vendored
@@ -3,11 +3,17 @@
|
||||
// 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 add . && git commit -m \"$TAG\" && git tag \"v$TAG\" && git push origin main --tags && tea release create --title \"$TAG\" --tag=\"$TAG\"",
|
||||
"problemMatcher":[]
|
||||
"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