Skip to content

Commit

Permalink
Adds plugin actions to the project's CI (mattermost-community#471)
Browse files Browse the repository at this point in the history
* Adds plugin actions to the project's CI

* Remove the version number from the generated artifact

* Change job name to something more descriptive

* Switch back to workflow_dispatch
  • Loading branch information
mgdelacroix authored May 25, 2021
1 parent f43e402 commit b327bc7
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 153 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/plugin-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Plugin-Release

on: workflow_dispatch

jobs:

plugin-release:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Replace token 1
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go

- name: Replace token 2
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go

- name: npm install
run: cd webapp; npm install --no-optional

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 16.1.0

- name: Build webapp
run: make webapp

- name: npm install plugin dependencies
run: cd mattermost-plugin/webapp; npm install --no-optional

- name: Build plugin
run: cd mattermost-plugin; make dist
env:
BUILD_NUMBER: ${{ github.run_id }}

- name: Rename plugin file
run: cd mattermost-plugin/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz

- name: Upload plugin artifact
uses: actions/upload-artifact@v1
with:
name: mattermost-plugin-focalboard.tar.gz
path: ${{ github.workspace }}/mattermost-plugin/dist/mattermost-plugin-focalboard.tar.gz
6 changes: 2 additions & 4 deletions mattermost-plugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ go 1.12

replace github.com/mattermost/focalboard/server => ../server

replace github.com/mattermost/mattermost-server/v5 => ../../mattermost-server

require (
github.com/mattermost/focalboard/server v0.0.0-20210331160003-42eaa744c065
github.com/mattermost/mattermost-server/v5 v5.34.2
github.com/mattermost/focalboard/server v0.0.0-20210525112228-f43e4028dbdc
github.com/mattermost/mattermost-server/v5 v5.3.2-0.20210524045451-a4f7df6f6e3c
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
)
111 changes: 14 additions & 97 deletions mattermost-plugin/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mattermost-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"support_url": "https://github.com/mattermost/mattermost-plugin-focalboard/issues",
"release_notes_url": "https://github.com/mattermost/mattermost-plugin-focalboard/releases/tag/v0.1.0",
"icon_path": "assets/starter-template-icon.svg",
"version": "0.2.0",
"min_server_version": "5.12.0",
"version": "0.6.7",
"min_server_version": "5.36.0",
"server": {
"executables": {
"linux-amd64": "server/dist/plugin-linux-amd64",
Expand Down
4 changes: 2 additions & 2 deletions mattermost-plugin/server/manifest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ require (
github.com/google/uuid v1.2.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/lib/pq v1.10.0
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattermost/mattermost-server/v5 v5.34.2
github.com/mattermost/mattermost-server/v5 v5.3.2-0.20210524045451-a4f7df6f6e3c
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/oklog/run v1.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/client_golang v1.10.0
github.com/rudderlabs/analytics-go v3.3.1+incompatible
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
Expand Down
Loading

0 comments on commit b327bc7

Please sign in to comment.