Skip to content

Commit

Permalink
Merge pull request #27 from ChinthakaJ98/connector-release
Browse files Browse the repository at this point in the history
Update connector to enable a release workflow
  • Loading branch information
ChinthakaJ98 authored Dec 9, 2024
2 parents 1afcdea + 8949a2a commit 5f47907
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 2 deletions.
118 changes: 118 additions & 0 deletions .connector-store/meta.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,135 @@
{
"name": "SharePoint",
"owner": "WSO2",
"product": "MI",
"category": "Storage and Content Management",
"documentationUrl": "https://mi.docs.wso2.com/en/latest/reference/connectors/sharepoint-connector/sharepoint-overview/",
"mavenGroupId": "org.wso2.integration.connector",
"mavenArtifactId": "mi-connector-sharepoint",
"description": "The sharePoint connector allows you to access the SharePoint REST API. SharePoint is a web application platform.SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, enterprise search, workflow management and web content management.",
"status": "Active",
"rank": 52,
"type": "Connector",
"releases": [
{
"tagName": "v1.1.0",
"products": [
"MI 4.3.0",
"MI 4.2.0"
],
"operations":[
{
"name":"init",
"description":"Config operation",
"isHidden":true
},
{
"name":"createFolder",
"description":"Create a new folder within the specified parent folder.",
"isHidden":false
},
{
"name":"createGroup",
"description":"Creates a new Microsoft 365 Group, which provisions a connected SharePoint site.",
"isHidden":false
},
{
"name":"createList",
"description":"Creates a new list in the specified site.",
"isHidden":false
},
{
"name":"createListItem",
"description":"Creates a new item in the specified list.",
"isHidden":false
},
{
"name":"deleteDriveItem",
"description":"Deletes the specified file or folder.",
"isHidden":false
},
{
"name":"deleteList",
"description":"Deletes the specified list.",
"isHidden":false
},
{
"name":"deleteListItem",
"description":"Deletes the specified list item.",
"isHidden":false
},
{
"name":"getDriveItemById",
"description":"Retrieves metadata about the specified file or folder.",
"isHidden":false
},
{
"name":"getFolderChildren",
"description":"Retrieves all items within the specified folder.",
"isHidden":false
},
{
"name":"getGroupSite",
"description":"Retrieves the root SharePoint site associated with the specified Microsoft 365 Group.",
"isHidden":false
},
{
"name":"getListById",
"description":"Retrieves a list by its ID or Title/Display name.",
"isHidden":false
},
{
"name":"getListItemById",
"description":"Retrieves a list item by its ID.",
"isHidden":false
},
{
"name":"getListItems",
"description":"Retrieves all items in the specified list.",
"isHidden":false
},
{
"name":"getLists",
"description":"Retrieves all lists in the specified site.",
"isHidden":false
},
{
"name":"getRootChildren",
"description":"Retrieves all items in the root directory of the drive.",
"isHidden":false
},
{
"name":"updateFileContent",
"description":"Updates the content of the specified file.",
"isHidden":false
},
{
"name":"updateFolder",
"description":"Updates the properties of the specified folder.",
"isHidden":false
},
{
"name":"updateList",
"description":"Updates properties of the specified list.",
"isHidden":false
},
{
"name":"updateListItemFields",
"description":"Updates the fields of the specified list item.",
"isHidden":false
},
{
"name":"uploadFile",
"description":"Uploads a new file to the specified folder.",
"isHidden":false
}
],
"connections": [
{
"name": "sharepoint",
"description": "Connection for accessing SharePoint data and files."
}
],
"isHidden": false
}
],
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Release

on:
workflow_dispatch:

jobs:
Ubuntu:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
with:
token: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
fetch-depth: 0
- name: Set up JDK 11
uses: joschi/setup-jdk@v2
with:
distribution: 'adopt'
java-version: 11
- name: Extract project version
run: |
VERSION=$(grep -oPm1 "(?<=<version>)[^<]+" pom.xml | sed 's/-SNAPSHOT$//')
VERSION_TAG="v$VERSION"
echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
- name: Configure Maven settings file
run: |
mkdir -p ~/.m2
echo "<settings>
<servers>
<server>
<id>nexus-releases</id>
<username>${{ secrets.NEXUS_USERNAME }}</username>
<password>${{ secrets.NEXUS_PASSWORD }}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
- name: Configure git credentials
run: |
git config --global user.name ${{ secrets.WSO2_INTEGRATION_BOT_USERNAME }}
git config --global user.email ${{ secrets.WSO2_INTEGRATION_BOT_EMAIL }}
- name: Build artifacts
run: |
mvn clean install
- name: Deploy artifacts with Maven
env:
GITHUB_TOKEN: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
run: |
mvn --batch-mode release:prepare release:perform -Dtag=${{ env.VERSION_TAG }}
- name: Create Github Release with Assets
env:
GITHUB_TOKEN: ${{ secrets.WSO2_INTEGRATION_BOT_TOKEN }}
run: |
find target/ -type f -name '*-SNAPSHOT.zip' -exec rm -f {} \;
gh release create "${{ env.VERSION_TAG }}" \
--repo="$GITHUB_REPOSITORY" \
--title="${{ env.VERSION_TAG }}" \
--generate-notes \
target/*.zip
11 changes: 9 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<groupId>org.wso2.carbon.esb.connector</groupId>
<artifactId>sharepoint</artifactId>
<groupId>org.wso2.integration.connector</groupId>
<artifactId>mi-connector-sharepoint</artifactId>
<version>1.1.0</version>

<name>WSO2 Carbon - Sharepoint Connector</name>
Expand Down Expand Up @@ -56,6 +56,13 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down

0 comments on commit 5f47907

Please sign in to comment.