Compare commits

...

20 Commits

Author SHA1 Message Date
4f0513c72c Update commit message formatting
Some checks failed
Release Creation / build (release) Failing after 26s
- Replace newline characters with line breaks in commit message body.
- Enhance readability by using a single line break between each line of the commit message.
2025-02-07 10:05:37 -06:00
5e064a8dfb 20250207.100205
All checks were successful
Release Creation / build (release) Successful in 27s
2025-02-07 10:02:05 -06:00
d0101c9666 Update workflow to use environment variables
Some checks failed
Release Creation / build (release) Failing after 23s
- The workflow has been updated to use environment variables instead of hardcoded values.
- This change improves the flexibility and maintainability of the workflow.
- The changes include using `$GITHUB_OUTPUT` to store the commit message and `$COMMIT_MESSAGE` to retrieve it.
2025-02-07 09:55:18 -06:00
fc88596821 20250207.095231
All checks were successful
Release Creation / build (release) Successful in 26s
2025-02-07 09:52:31 -06:00
859339b403 20250207.094650
All checks were successful
Release Creation / build (release) Successful in 24s
2025-02-07 09:46:50 -06:00
2dd53178cf Update release workflow and tasks
Some checks failed
Release Creation / build (release) Failing after 24s
- Updated the release workflow to use a more efficient method for setting the commit message.
- Added a new task to the VSCode tasks.json file to create a new release with a dynamic tag based on the current date and
time.

These changes improve the efficiency and automation of the release process, ensuring that releases are created with accurate
and up-to-date information.
2025-02-07 09:43:21 -06:00
d4b5c3fe66 20250207.092640
All checks were successful
Release Creation / build (release) Successful in 24s
2025-02-07 09:26:40 -06:00
6ac5ceb26a 20250207.092516
All checks were successful
Release Creation / build (release) Successful in 30s
2025-02-07 09:25:16 -06:00
a4a5a97fd6 20250207.091515
All checks were successful
Release Creation / build (release) Successful in 27s
2025-02-07 09:15:15 -06:00
bd30095e45 20250207.091003
All checks were successful
Release Creation / build (release) Successful in 28s
2025-02-07 09:10:03 -06:00
592889ea4c 20250207.085641
All checks were successful
Release Creation / build (release) Successful in 25s
2025-02-07 08:56:41 -06:00
3a1443c153 20250207.084320
Some checks failed
Release Creation / build (release) Failing after 21s
2025-02-07 08:43:20 -06:00
1142817d41 20250207.084053
Some checks failed
Release Creation / build (release) Failing after 23s
2025-02-07 08:40:53 -06:00
89f0b930f5 20250207.083655
Some checks failed
Release Creation / build (release) Failing after 22s
2025-02-07 08:36:55 -06:00
4e9bc012f9 20250207.083235
Some checks failed
Release Creation / build (release) Failing after 23s
2025-02-07 08:32:35 -06:00
187839be20 20250207.083131
Some checks failed
Release Creation / build (release) Failing after 25s
2025-02-07 08:31:31 -06:00
b8ac60b8a2 20250207.082811
Some checks failed
Release Creation / build (release) Failing after 22s
2025-02-07 08:28:11 -06:00
a6278772fc 20250207.082305
Some checks failed
Release Creation / build (release) Failing after 20s
2025-02-07 08:23:05 -06:00
64a96747be 20250207.081601
All checks were successful
Release Creation / build (release) Successful in 29s
2025-02-07 08:16:01 -06:00
23a208387c 20250207.080819
All checks were successful
Release Creation / build (release) Successful in 32s
2025-02-07 08:08:19 -06:00
5 changed files with 42 additions and 59 deletions

View File

@@ -14,14 +14,13 @@ 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 }} ${{ github.repository }} ${{ github.event.release.tag_name }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.release.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}}
@@ -29,9 +28,19 @@ jobs:
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
# 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.json src - name: Create files (module.zip, module.json) for release
- run: echo "Files- $(ls -la ${{ github.workspace }})" run: >
- run: echo "secret- `${{ secrets.TEST }}`" 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 # Create a release for this specific version
- name: Update Release with Files - name: Update Release with Files
@@ -39,5 +48,7 @@ jobs:
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
files: |- files: |-
./module.json ./dist/module.json
./module.zip ./dist/module.zip
body: |-
${{ steps.commit-message.outputs.COMMIT_MESSAGE }}

View File

@@ -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 }}

19
.vscode/tasks.json vendored Normal file
View 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": []
}
]
}

View File

@@ -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":""
} }