-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
101 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: CI and CD | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install LibreOffice | ||
run: sudo apt-get install libreoffice-impress xmlstarlet poppler-utils | ||
- name: Build Extension | ||
run: make | ||
- name: Install Extension | ||
run: make install | ||
- name: Test Extension | ||
run: make test | ||
|
||
|
||
cd: | ||
if: github.event_name == 'push' && endsWith(github.ref, '/master') | ||
|
||
needs: ci | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: sudo apt-get install xmlstarlet | ||
- name: Build Extension | ||
run: make | ||
- name: Set Version | ||
run: | | ||
version=`xmlstarlet sel -N oo="http://openoffice.org/extensions/description/2006" -t -v "//oo:version/@value" extension/description.xml` | ||
echo ::set-env name=VERSION::$version | ||
- name: Create GitHub Releases | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
release_name: Release ${{ env.VERSION }} | ||
# Uncomment if some release notes are available | ||
#body: | | ||
# Changes in this Release | ||
# - First Change | ||
# - Second Change | ||
draft: false | ||
prerelease: false | ||
- name: Post Extension to GitHub Releases | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
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 | ||
asset_path: ./dist/ExpandAnimations-${{ env.VERSION }}.oxt | ||
asset_name: ExpandAnimations-${{ env.VERSION }}.oxt | ||
asset_content_type: application/zip | ||
- name: Increase Version | ||
run: ./increase-version.sh | ||
- name: Commit Git Changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Version Bot" | ||
git add extension/description.xml | ||
git commit -m "Extension version updated" | ||
- name: Push Git Changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<description | ||
xmlns="http://openoffice.org/extensions/description/2006" | ||
xmlns:dep="http://openoffice.org/extensions/description/2006" | ||
xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<identifier value="vnd.basicaddonbuilder.expandanimations"/> | ||
|
||
<version value="0.7-Snapshot"/> | ||
<!-- <dependencies> | ||
<OpenOffice.org-minimal-version value="2.1" dep:name="OpenOffice.org 2.1"/> | ||
</dependencies> --> | ||
<registration> | ||
<simple-license accept-by="admin" default-license-id="ID0" suppress-on-update="true" > | ||
<license-text xlink:href="registration/lgpl-3.0.txt" lang="en" license-id="ID0" /> | ||
</simple-license> | ||
</registration> | ||
|
||
<display-name> | ||
<name lang="en">Expand Animations</name> | ||
</display-name> | ||
</description> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<identifier value="vnd.basicaddonbuilder.expandanimations"/> | ||
<version value="0.7"/> | ||
<!-- <dependencies> | ||
<OpenOffice.org-minimal-version value="2.1" dep:name="OpenOffice.org 2.1"/> | ||
</dependencies> --> | ||
<registration> | ||
<simple-license accept-by="admin" default-license-id="ID0" suppress-on-update="true"> | ||
<license-text xlink:href="registration/lgpl-3.0.txt" lang="en" license-id="ID0"/> | ||
</simple-license> | ||
</registration> | ||
<display-name> | ||
<name lang="en">Expand Animations</name> | ||
</display-name> | ||
</description> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
CURRENT_VERSION=`xmlstarlet sel -N oo="http://openoffice.org/extensions/description/2006" -t -v "//oo:version/@value" extension/description.xml` | ||
MAJOR_VERSION=${CURRENT_VERSION%.*} | ||
MINOR_VERSION=${CURRENT_VERSION#*.} | ||
NEW_VERSION=$MAJOR_VERSION'.'$(($MINOR_VERSION+1)) | ||
echo "Current major version: "$MAJOR_VERSION | ||
echo "Current minor version: "$MINOR_VERSION | ||
echo "New version: "$NEW_VERSION | ||
xmlstarlet ed --inplace -N oo="http://openoffice.org/extensions/description/2006" -u "//oo:version/@value" -v $NEW_VERSION extension/description.xml |