Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd69d72adb | ||
|
|
8bcd564447 | ||
|
|
043da741fa | ||
|
|
a2fdeafc3c |
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
|
|
||||||
|
- name: Install semantic-release
|
||||||
|
run: |
|
||||||
|
npm install -g semantic-release \
|
||||||
|
@semantic-release/commit-analyzer \
|
||||||
|
@semantic-release/release-notes-generator \
|
||||||
|
@semantic-release/changelog \
|
||||||
|
@semantic-release/github \
|
||||||
|
@semantic-release/git
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: npx semantic-release
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
*.json
|
*.json
|
||||||
|
!.releaserc.json
|
||||||
*.sum
|
*.sum
|
||||||
config/*
|
config/*
|
||||||
39
.releaserc.json
Normal file
39
.releaserc.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"branches": ["main"],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"preset": "angular",
|
||||||
|
"releaseRules": [
|
||||||
|
{"message": "*#patch*", "release": "patch"},
|
||||||
|
{"message": "*#minor*", "release": "minor"},
|
||||||
|
{"message": "*#major*", "release": "major"},
|
||||||
|
{"type": "fix", "release": "patch"},
|
||||||
|
{"type": "feat", "release": "minor"},
|
||||||
|
{"type": "perf", "release": "patch"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
"preset": "angular"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
{
|
||||||
|
"changelogFile": "CHANGELOG.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/github",
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": ["CHANGELOG.md"],
|
||||||
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# [0.5.0](https://git.debyl.io/debyltech/go-snipcart/compare/v0.4.1...v0.5.0) (2026-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add discount and savings fields to Order struct ([043da74](https://git.debyl.io/debyltech/go-snipcart/commit/043da741fafd24e3fb0bddbe06880c81c1b64b1f))
|
||||||
@@ -26,6 +26,29 @@ type Item struct {
|
|||||||
Shippable bool `json:"shippable,omitempty"`
|
Shippable bool `json:"shippable,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Discount struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
DiscountID string `json:"discountId"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Code string `json:"code,omitempty"`
|
||||||
|
Trigger string `json:"trigger,omitempty"`
|
||||||
|
Type string `json:"type,omitempty"`
|
||||||
|
Rate float64 `json:"rate,omitempty"`
|
||||||
|
Amount float64 `json:"amount,omitempty"`
|
||||||
|
AmountSaved float64 `json:"amountSaved,omitempty"`
|
||||||
|
NormalizedRate float64 `json:"normalizedRate,omitempty"`
|
||||||
|
Combinable bool `json:"combinable"`
|
||||||
|
HasSavedAmount bool `json:"hasSavedAmount"`
|
||||||
|
MaxDiscountsPerItem *int `json:"maxDiscountsPerItem,omitempty"`
|
||||||
|
TotalToReach *float64 `json:"totalToReach,omitempty"`
|
||||||
|
ProductIds string `json:"productIds,omitempty"`
|
||||||
|
Categories string `json:"categories,omitempty"`
|
||||||
|
NumberOfUsages int `json:"numberOfUsages,omitempty"`
|
||||||
|
AppliesOnAllRecurring bool `json:"appliesOnAllRecurringOrders"`
|
||||||
|
CreationDate string `json:"creationDate,omitempty"`
|
||||||
|
ModificationDate string `json:"modificationDate,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type OrderTax struct {
|
type OrderTax struct {
|
||||||
Name string `json:"taxName"`
|
Name string `json:"taxName"`
|
||||||
Rate float64 `json:"taxRate"`
|
Rate float64 `json:"taxRate"`
|
||||||
@@ -63,6 +86,7 @@ type Order struct {
|
|||||||
TotalTaxes float64 `json:"taxesTotal,omitempty"`
|
TotalTaxes float64 `json:"taxesTotal,omitempty"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
TotalWeight float64 `json:"totalWeight"`
|
TotalWeight float64 `json:"totalWeight"`
|
||||||
|
ShippingAddressSameAsBilling bool `json:"shippingAddressSameAsBilling,omitempty"`
|
||||||
ShippingAddress Address `json:"shippingAddress,omitempty"`
|
ShippingAddress Address `json:"shippingAddress,omitempty"`
|
||||||
Name string `json:"shippingAddressName,omitempty"`
|
Name string `json:"shippingAddressName,omitempty"`
|
||||||
Company string `json:"shippingAddressCompanyName,omitempty"`
|
Company string `json:"shippingAddressCompanyName,omitempty"`
|
||||||
@@ -80,6 +104,9 @@ type Order struct {
|
|||||||
ShippingProvider string `json:"shippingProvider,omitempty"`
|
ShippingProvider string `json:"shippingProvider,omitempty"`
|
||||||
ShippingMethod string `json:"shippingMethod,omitempty"`
|
ShippingMethod string `json:"shippingMethod,omitempty"`
|
||||||
ShippingRateId string `json:"shippingRateUserDefinedId,omitempty"`
|
ShippingRateId string `json:"shippingRateUserDefinedId,omitempty"`
|
||||||
|
Discounts []Discount `json:"discounts,omitempty"`
|
||||||
|
SavedAmount float64 `json:"savedAmount,omitempty"`
|
||||||
|
TotalRebateRate float64 `json:"totalRebateRate,omitempty"`
|
||||||
Items []Item `json:"items"`
|
Items []Item `json:"items"`
|
||||||
Taxes []OrderTax `json:"taxes,omitempty"`
|
Taxes []OrderTax `json:"taxes,omitempty"`
|
||||||
Metadata any `json:"metadata"`
|
Metadata any `json:"metadata"`
|
||||||
|
|||||||
Reference in New Issue
Block a user