Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Std CD

on:
push:
tags:
- "v*.*.*"

concurrency:
group: std-cd-${{ github.workflow }}-${{ github.ref_type }}
cancel-in-progress: false

permissions:
contents: write
packages: write

jobs:
package:
runs-on: ubuntu-latest
steps:
- run: sudo snap install jsonschema
- uses: actions/checkout@v4
- run: make lint
- run: make test
- run: make dist

- run: gh config set prompt disabled
env:
GH_TOKEN: ${{ github.token }}

- name: Perform Tag Release
run: |
gh release create ${{ github.ref_name }} --draft=false --title ${{ github.ref_name }} --target "$GITHUB_SHA" --generate-notes
gh release upload --clobber ${{ github.ref_name }} dist/*.zip dist/*.tar.gz
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Std
name: Std CI

on:
schedule:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
/build
/dist
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RMRF ?= rm -rf
SCHEMAS = $(shell find schemas/ -type f -name '*.json')
TESTS = $(shell find test/ -type f -name '*.json')

VERSION = $(shell tr -d '\n\r' < VERSION)

all: common test
$(JSONSCHEMA) fmt schemas meta --verbose
$(JSONSCHEMA) fmt test --verbose --default-dialect "https://json-schema.org/draft/2020-12/schema"
Expand Down Expand Up @@ -38,3 +40,10 @@ include generate/iso/language/include.mk
include generate/iso/country/include.mk
external: $(EXTERNAL)
generate: $(GENERATE)

.PHONY: dist
dist:
$(RMRF) $@
$(MKDIRP) $@
$(BSDTAR) -caf $@/sourcemeta-std-v$(VERSION).zip -s '|^schemas/||' --exclude '.DS_Store' schemas/* LICENSE
$(BSDTAR) -czf $@/sourcemeta-std-v$(VERSION).tar.gz -s '|^schemas/||' --exclude '.DS_Store' schemas/* LICENSE
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1