File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # .github/workflows/version.yml
2+ name : Git Version
3+
4+ on :
5+ push :
6+ branches :
7+ - master
8+
9+ jobs :
10+ release-managment :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout Code
14+ uses : actions/checkout@v3
15+ with :
16+ ref : ${{ github.head_ref }} # checkout the correct branch name
17+ fetch-depth : 0 # fetch the whole repo history
18+
19+ # Based on https://github.com/marketplace/actions/git-version
20+ - name : Git Version
21+ id : version
22+ uses : codacy/git-version@2.7.1
23+ with :
24+ release-branch : master
25+ dev-branch : development
26+
27+ - name : Use the version
28+ run : |
29+ echo ${{ steps.version.outputs.version }}
30+ # https://github.com/marketplace/actions/zip-release
31+ - name : Archive Release
32+ uses : thedoctor0/zip-release@main
33+ with :
34+ type : ' zip'
35+ filename : ' release.zip'
36+ exclusions : ' *.git* /*node_modules/* .editorconfig'
37+ # https://github.com/marvinpinto/action-automatic-releases
38+ - uses : " marvinpinto/action-automatic-releases@latest"
39+ with :
40+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
41+ automatic_release_tag : ${{ steps.version.outputs.version }}
42+ prerelease : false
43+ title : " Release ${{ steps.version.outputs.version }}"
44+ files : |
45+ LICENSE.md
46+ release.zip
Original file line number Diff line number Diff line change 1919 runs-on : ubuntu-latest
2020 steps :
2121 - name : Update publiccode.yaml
22- uses : OpenCatalogi/publiccode-action
22+ uses : OpenCatalogi/publiccode-action@latest
2323` ` ` `
2424
2525In the above example a publiccode file is updated every time code on the `main` branche is touched
@@ -28,7 +28,7 @@ In the above example a publiccode file is updated every time code on the `main`
2828
2929| Input Name | Description | Default Value |
3030|--------------|--------------------------------------------------------------|-----------------------|
31- | `name` | Git URL of the remote repository to check (Optional) | Empty String |
31+ | `name` | Git URL of the remote repository to check (Optional) | {{ github.event.repository.name }}" |
3232| `description` | Git URL of the remote repository to check (Optional) | Empty String |
3333| `remoterepo` | Git URL of the remote repository to check (Optional) | Empty String |
3434| `publiccode` | `publiccode.yml` path (Optional), e.g. `data/publiccode.yml` | `publiccode.yml` |
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ branding:
77 color : ' blue'
88
99inputs :
10- remoterepo :
10+ repository :
1111 description : ' Git url of the remote repository you want to check'
1212 required : false
1313 default : ' '
5757 echo "ORGANISATION_URL=${{ github.event.organization.login }}" >> $GITHUB_ENV
5858 echo "ORGANISATION_AVATAR=${{ github.event.organization.avatar_url }}" >> $GITHUB_ENV
5959
60- echo "Installing PyYAML..."
61- pip install PyYAML
60+ echo "Installing PyYAML..."
61+ pip install PyYAML
6262 # Create changes if it is a normal repository
6363 - name : Create or update the publiccode file
6464 if : (!contains(github.repository, '.github'))
You can’t perform that action at this time.
0 commit comments