Compare commits
13 Commits
v0.0.0
...
v20250207.
| Author | SHA1 | Date | |
|---|---|---|---|
|
d89e549a2a
|
|||
|
51acb3f348
|
|||
|
328fcea7f6
|
|||
|
00fd997d75
|
|||
|
d68a7ca49d
|
|||
|
78e593fbca
|
|||
|
7a30f53dce
|
|||
|
f1a1a22939
|
|||
|
ee9a873440
|
|||
|
7ed54aa297
|
|||
|
0e9d62ccd0
|
|||
|
cc03fe3fe1
|
|||
|
338229b79d
|
@@ -1,19 +0,0 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Extract tag version number
|
||||
id: get_version
|
||||
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 }}
|
||||
|
||||
# Substitute the Manifest and Download URLs in the module.json
|
||||
- name: Substitute Manifest and Download Links For Versioned Ones
|
||||
@@ -24,23 +24,20 @@ jobs:
|
||||
files: 'module.json'
|
||||
env:
|
||||
version: ${{steps.get_version.outputs.version-without-v}}
|
||||
url: https://github.com/${{github.repository}}
|
||||
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
|
||||
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
|
||||
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 demo.md
|
||||
- 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
|
||||
uses: actions/gitea-release-action
|
||||
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: './module.json, ./module.zip'
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
body: ${{ github.event.release.body }}
|
||||
files: |-
|
||||
./module.json
|
||||
./module.zip
|
||||
49
.github/workflows/main.yml
vendored
Normal file
49
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
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 }}
|
||||
2
.secrets
Normal file
2
.secrets
Normal file
@@ -0,0 +1,2 @@
|
||||
TEST=123
|
||||
GITHUB_TOKEN=90b74545400305cb379a38d2c442d29d3aa911a4
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"name": "new-demo"
|
||||
"name": "gitea-actions-demo",
|
||||
"download": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/v0.2.1/module.zip",
|
||||
"manifest": "https://gitea.ascorrea.com/asc/gitea-actions-demo/releases/download/latest/module.json",
|
||||
}
|
||||
0
src/main.js
Normal file
0
src/main.js
Normal file
Reference in New Issue
Block a user