diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..a56128fd9 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +# .github/release.yml + +changelog: + exclude: + authors: + - dependabot + categories: + - title: Enhancements + labels: + - C-enhancement + - title: Bug Fixes + labels: + - C-bug + - title: Documentation + labels: + - C-documentation + - title: Tests + labels: + - C-testing + - title: Other Changes + labels: + - '*' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..1d0064a93 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Publish Release + +on: + release: + types: [published] + +jobs: + publish: + name: Publish crate + runs-on: ubuntu-latest + timeout-minutes: 60 + env: + RUSTFLAGS: -D warnings + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Package (dry-run) + run: cargo package + - name: Publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + PATCH: ${{ github.run_number }} + shell: bash + run: | + git config --global user.email "runner@gha.local" + git config --global user.name "Github Action" + cargo publish diff --git a/Cargo.toml b/Cargo.toml index 9d993edf0..939bb946b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,21 @@ [package] -name = "temporal_rs" # Working name - TODO: Update name to decided. +name = "temporal_rs" keywords = ["javascript", "js", "temporal", "calendar", "date", "time", "timezone"] categories = ["date", "time", "calendars"] readme = "./README.md" -description = "Temporal in Rust is an implementation of TC39 Temporal Builtin Proposal in Rust." +description = "Temporal in Rust is an implementation of the TC39 Temporal Builtin Proposal in Rust." version = "0.0.1" edition = "2021" authors = ["boa-dev"] license = "MIT" repository = "https://github.com/boa-dev/temporal" rust-version = "1.74" +exclude = [ + "docs/*", + ".github/*", + ".gitignore", + "LICENSE*", +] [dependencies] tinystr = "0.7.4" diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 000000000..ddbfc764e --- /dev/null +++ b/cliff.toml @@ -0,0 +1,83 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[remote.github] +owner = "boa-dev" +repo = "temporal" + +[changelog] +body = """ +## What's Changed + +{%- if version %} in {{ version }}{%- endif -%} +{% for commit in commits %} + {% if commit.github.pr_title -%} + {%- set commit_message = commit.github.pr_title -%} + {%- else -%} + {%- set commit_message = commit.message -%} + {%- endif -%} + * {{ commit_message | split(pat="\n") | first | trim }}\ + {% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%} + {% if commit.github.pr_number %} in \ + [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \ + {%- endif %} +{%- endfor -%} + +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} + {% raw %}\n{% endraw -%} + ## New Contributors +{%- endif %}\ +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + * @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} in \ + [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} +{%- endfor -%} + +{% if version %} + {% if previous.version %} + **Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }} + {% endif %} +{% else -%} + {% raw %}\n{% endraw %} +{% endif %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# remove the leading and trailing whitespace from the template +trim = true +# changelog footer +footer = """ + +""" +# postprocessors +postprocessors = [] + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = false +# filter out the commits that are not conventional +filter_unconventional = false +# process each line of a commit as an individual commit +split_commits = false +# regex for preprocessing the commit messages +commit_preprocessors = [ + # remove issue numbers from commits + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, +] +# protect breaking changes from being skipped due to matching a skipping commit_parser +protect_breaking_commits = false +# filter out the commits that are not matched by commit parsers +filter_commits = false +# regex for matching git tags +tag_pattern = "v[0-9].*" +# regex for skipping tags +skip_tags = "beta|alpha" +# regex for ignoring tags +ignore_tags = "rc" +# sort the tags topologically +topo_order = false +# sort the commits inside sections by oldest/newest order +sort_commits = "newest"