Skip to content

Commit

Permalink
Update Outlook link base.
Browse files Browse the repository at this point in the history
  • Loading branch information
barinbritva committed Feb 24, 2024
1 parent 84c29e5 commit e5b2ff5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,29 @@ name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- id: get-package
run: |
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/} | grep -oP '(?<=\d\.\d\.\d-)\w+' || echo 'latest')"
shell: bash

# Reuse steps from Pull Request workflow
- uses: actions/checkout@v3

- name: Check version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [[ "${{steps.get-package.outputs.version}}" != "v${PACKAGE_VERSION}" ]]; then
echo "Tag version ${{steps.get-package.outputs.version}} does not match package version ${PACKAGE_VERSION}."
exit 1
fi
- uses: pnpm/action-setup@v2
with:
version: 8
Expand All @@ -25,13 +40,7 @@ jobs:
- name: Run tests
run: pnpm test

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc

- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public

- name: Delete .npmrc
run: rm .npmrc
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access=public --tag=${{ steps.get-package.outputs.tag }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea
.vscode
coverage
dist
node_modules
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.tabCompletion": "on",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["mailgun", "typestyle"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@barinbritva/add-to-calendar",
"version": "1.3.1",
"version": "1.3.2@next",
"keywords": [
"event",
"add",
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Office365.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Outlook} from './Outlook';

export class Office365 extends Outlook {
protected urlBase = 'https://outlook.office.com/calendar/0/deeplink/compose';
protected urlBase = 'https://outlook.office.com/calendar/deeplink/compose';
}
2 changes: 1 addition & 1 deletion src/Generator/Outlook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface QueryParameters extends QueryObject {
}

export class Outlook extends UrlGenerator {
protected urlBase = 'https://outlook.live.com/calendar/0/deeplink/compose';
protected urlBase = 'https://outlook.live.com/calendar/deeplink/compose';

protected convertEventToQueryObject(event: Event): QueryParameters {
return {
Expand Down

0 comments on commit e5b2ff5

Please sign in to comment.