Skip to content

Commit f91a5dd

Browse files
committed
Update git worflows
Prepare 2.0.2
1 parent 4fe3d12 commit f91a5dd

4 files changed

Lines changed: 26 additions & 17 deletions

File tree

.github/workflows/generatemo.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repo
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Setup Perl environment
1919
# You may pin to the exact commit or the version.
2020
# uses: shogo82148/actions-setup-perl@8d2e3d59a9516b785ed32169d48a4888eaa9b514
21-
uses: shogo82148/actions-setup-perl@v1.20.1
21+
uses: shogo82148/actions-setup-perl@v1
2222
- name: msgfmt
2323
# You may pin to the exact commit or the version.
2424
# uses: whtsky/msgfmt-action@6b2181f051b002182d01a1e1f1aff216230c5a4d
@@ -27,11 +27,11 @@ jobs:
2727
run: perl tools/update_mo.pl;
2828

2929
- name: Commit changes
30-
uses: EndBug/add-and-commit@v5.1.0
30+
uses: EndBug/add-and-commit@v9
3131
with:
3232

3333
message: "Generate mo"
3434
- name: Push changes
3535

36-
uses: actions-go/push@v1
36+
uses: actions-go/push@master
3737

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
# Sequence of patterns matched against refs/tags
55
tags:
6-
- '*.*.*' # Push events to matching ex:20.15.10
6+
- '*.*.*' # Push events to matching ex:20.15.10
77

88
name: Create release with tag
99
env:
@@ -14,29 +14,33 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 7.4
1822
- name: Build project # This would actually build your project, using zip for an example artifact
1923
id: build_
2024
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
25+
GITHUB_NAME: ${{ github.event.repository.name }}
26+
27+
28+
run: php -v ;sudo apt-get install libxml-xpath-perl; sudo apt-get install composer;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); [[ -f composer.json ]] && composer install --no-dev; 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 }};
29+
# 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.bz2 $GITHUB_NAME
2630
- name: Create Release
2731
id: create_release
2832
uses: actions/create-release@v1
2933
env:
3034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3135
with:
3236
tag_name: ${{ github.ref }}
33-
release_name: |
34-
GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
37+
release_name: |
38+
GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
3539
body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }}
3640
draft: false
3741
prerelease: true
3842
- name: Upload Release Asset
39-
id: upload-release-asset
43+
id: upload-release-asset
4044
uses: actions/upload-release-asset@v1
4145
env:
4246
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/updatepot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repo
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919

2020
- name: install xgettext
2121

@@ -25,10 +25,10 @@ jobs:
2525

2626

2727
- name: Commit changes
28-
uses: EndBug/add-and-commit@v5.1.0
28+
uses: EndBug/add-and-commit@v9
2929
with:
3030
message: "Update POT"
3131
- name: Push changes
3232

33-
uses: actions-go/push@v1
33+
uses: actions-go/push@master
3434

printercounters.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ The plugin allows :
3535
<author>Infotel</author>
3636
</authors>
3737
<versions>
38+
<version>
39+
<num>2.0.2</num>
40+
<compatibility>~10.0</compatibility>
41+
<download_url>https://github.com/InfotelGLPI/printercounters/releases/download/2.0.2/glpi-printercounters-2.0.2.tar.bz2</download_url>
42+
</version>
3843
<version>
3944
<num>2.0.1</num>
4045
<compatibility>~10.0</compatibility>

0 commit comments

Comments
 (0)