From 5c195afafa1ff26b2e6b63ff3b9e02539852744a Mon Sep 17 00:00:00 2001 From: Laurence Bahiirwa Date: Thu, 13 Oct 2022 22:49:34 +0300 Subject: [PATCH] Add new workflows to deploy --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/welcome.yml | 25 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..2aac27a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Release +on: + push: + branches: + - releases + release: + types: + - published + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + + - name: Install the dependencies + run: npm i + + - name: Install vsce + run: npm i -g vsce + + - name: Publish + run: vsce publish -p ${{ secrets.VSCE_PAT }} diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 0000000..d8171e1 --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,25 @@ +name: Welcome New Contributors + +on: + branches: + - main + pull_request_target: + types: [ opened ] + +jobs: + # Comments on a pull request when the author is a new contributor. + post-welcome-message: + runs-on: ubuntu-latest + steps: + - uses: bubkoo/welcome-action@8dbbac2540d155744c90e4e37da6b05ffc9c5e2c # v1.0.3 + with: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + FIRST_PR_COMMENT: + Hi @{{ author }}! 👋 + Thank you for your contribution to ClassicPress Snippets! 💖 + It looks like this is your first pull request. We appreciate and value your contribution! + + Please read our [contribution guide](CONTRIBUTING.md) to find out how you can be more involved. + + Thank you, + Laurence, ClassicPress Snippets Team.