Skip to content

Commit 3655697

Browse files
committed
Update for launch release
1 parent bab52d9 commit 3655697

File tree

3 files changed

+23
-43
lines changed

3 files changed

+23
-43
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Automatically tag new version"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
paths:
8+
- "setup.php"
9+
10+
jobs:
11+
auto-tag-new-version:
12+
name: "Automatically tag new version"
13+
uses: "glpi-project/plugin-release-workflows/.github/workflows/auto-tag-new-version.yml@v1"
14+
secrets:
15+
github-token: "${{ secrets.AUTOTAG_TOKEN }}"

.github/workflows/release.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,13 @@
1+
name: "Publish release"
12

23
on:
34
push:
4-
# Sequence of patterns matched against refs/tags
55
tags:
6-
- '*.*.*' # Push events to matching ex:20.15.10
6+
- '*'
77

8-
name: Create release with tag
9-
env:
10-
TAG_VALUE: ${GITHUB_REF/refs\/tags\//}
118
jobs:
12-
build:
13-
name: Upload Release Asset
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
18-
- name: Build project # This would actually build your project, using zip for an example artifact
19-
id: build_
20-
env:
21-
GITHUB_NAME: ${{ github.event.repository.name }}
22-
23-
24-
run: sudo apt-get install libxml-xpath-perl;echo $(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml);echo ::set-output name=version_glpi::$(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml); rm -rf $GITHUB_NAME.xml tools wiki screenshots test .git .github ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png;cd ..; tar jcvf glpi-$GITHUB_NAME-${GITHUB_REF/refs\/tags\//}.tar.bz2 $GITHUB_NAME;ls -al;echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//};echo ${{ steps.getxml.outputs.info }};
25-
# run: rm -rf $GITHUB_NAME.xml tools wiki screenshots test ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png; tar -zcvf glpi-$GITHUB_NAME-$GITHUB_TAG.tar.gz $GITHUB_NAME
26-
- name: Create Release
27-
id: create_release
28-
uses: actions/create-release@v1
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
with:
32-
tag_name: ${{ github.ref }}
33-
release_name: |
34-
GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
35-
body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }}
36-
draft: false
37-
prerelease: true
38-
- name: Upload Release Asset
39-
id: upload-release-asset
40-
uses: actions/upload-release-asset@v1
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
GITHUB_NAME: ${{ github.event.repository.name }}
44-
with:
45-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
46-
asset_path: /home/runner/work/${{ github.event.repository.name }}/glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
47-
asset_name: glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
48-
asset_content_type: application/zip
49-
9+
publish-release:
10+
permissions:
11+
contents: "write"
12+
name: "Publish release"
13+
uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"

setup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function plugin_init_connections()
102102
}
103103
}
104104

105+
105106
// Get the name and the version of the plugin - Needed
106107
/**
107108
* @return array

0 commit comments

Comments
 (0)