Skip to content

Commit

Permalink
ci: added release process
Browse files Browse the repository at this point in the history
  • Loading branch information
khawarizmus committed Jan 12, 2024
1 parent ad18c35 commit 6409aa9
Show file tree
Hide file tree
Showing 6 changed files with 1,355 additions and 29 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,28 @@ jobs:

- name: Generate Dates
run: nr date:generate

- name: Test
run: nr test

release:
runs-on: ubuntu-latest
name: Release
needs: test
if: github.event_name == 'push'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3
- run: yarn
- run: yarn build
- name: Preparing a release 🚀
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
node-version: 18.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ This implementation aims to standardise rules across all varieties of Hijri (isl

The implementation is an extension of the [`Calendar`](https://github.com/js-temporal/temporal-polyfill/blob/a44a1bb61c738a504023427c486ab0a315c7b9d3/lib/calendar.ts#L129C14-L129C22) class from [`Temporal`](https://github.com/js-temporal/temporal-polyfill)

## Usage

```js
import { HWCUmalqura } from 'hijri-week-calendar'

const calendar = new HWCUmalqura()
const HWCZonedDate = Temporal.ZonedDateTime.from({ year: 1444, month: 2, day: 3, timeZone: 'Asia/Riyadh', calendar: new HWCUmalqura() })

// the calendar can be used directly
console.log(customCalendar.HWCRepresentation(HWCZonedDate)) // { calendar: 'islamic-umalqura', dayOfWeek: 4, weekOfYear: 5, yearOfWeek: 1444, }

// or it can be used as a calendar in the Temporal Objects that support a calendar
console.log(HWCZonedDate.HWCRepresentation) // { calendar: 'islamic-umalqura', dayOfWeek: 4, weekOfYear: 5, yearOfWeek: 1444, }
```

# Rules

The proposed rules (which follow the ISO week standards) are designed to be applicable to all types of Hijri (islamic) Calendars, not limited to just the tabular varieties. This includes compatibility with calendars such as the Umm al-Qura calendar. For more information on non-compatible calendars, see [Compatible Calendars](/#compatible-calendars) section.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.7",
"@npmcli/ci-detect": "^3.0.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/ms": "^0.7.34",
"@types/node": "^20.10.5",
"@types/npmcli__ci-detect": "^2.0.3",
Expand Down
Loading

0 comments on commit 6409aa9

Please sign in to comment.