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
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'

- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Verify version matches
run: |
GEM_VERSION=$(ruby -r ./lib/jsonapi/resources/version.rb -e "puts JSONAPI::Resources::VERSION")
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
if [ "$GEM_VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: gem version ($GEM_VERSION) != tag version ($TAG_VERSION)"
exit 1
fi
echo "Version verified: $GEM_VERSION"

- name: Generate release notes
id: release_notes
run: |
# Get the previous tag
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")

if [ -n "$PREV_TAG" ]; then
echo "Generating changelog from $PREV_TAG to ${{ github.ref_name }}"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" $PREV_TAG..${{ github.ref_name }} | head -50)
else
echo "No previous tag found, using recent commits"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" -20)
fi

# Write to file to preserve newlines
echo "$CHANGELOG" > /tmp/changelog.txt

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
body_path: /tmp/changelog.txt
draft: false
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') || contains(github.ref_name, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# JSONAPI::Resources [![Gem Version](https://badge.fury.io/rb/jsonapi-resources.svg)](https://badge.fury.io/rb/jsonapi-resources) [![Build Status](https://secure.travis-ci.org/cerebris/jsonapi-resources.svg?branch=master)](http://travis-ci.org/cerebris/jsonapi-resources) [![Code Climate](https://codeclimate.com/github/cerebris/jsonapi-resources/badges/gpa.svg)](https://codeclimate.com/github/cerebris/jsonapi-resources)

[![Join the chat at https://gitter.im/cerebris/jsonapi-resources](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cerebris/jsonapi-resources?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# JSONAPI::Resources

`JSONAPI::Resources`, or "JR", provides a framework for developing an API server that complies with the
[JSON:API](http://jsonapi.org/) specification.
Expand All @@ -13,7 +11,7 @@ backed by ActiveRecord models or by custom objects.

## Documentation

Full documentation can be found at [http://jsonapi-resources.com](http://jsonapi-resources.com), including the [v0.10 alpha Guide](http://jsonapi-resources.com/v0.10/guide/) specific to this version.
Full documentation can be found at [http://jsonapi-resources.com](http://jsonapi-resources.com), including the [v0.10 alpha Guide](http://jsonapi-resources.com/v0.10/guide/) specific to this version.

## Demo App

Expand All @@ -28,19 +26,19 @@ which *should* be compatible with JSON:API compliant server implementations such

Add JR to your application's `Gemfile`:

```
```
gem 'jsonapi-resources'
```

And then execute:

```bash
```bash
bundle
```

Or install it yourself as:

```bash
```bash
gem install jsonapi-resources
```

Expand All @@ -49,7 +47,7 @@ gem install jsonapi-resources
## Contributing

1. Submit an issue describing any new features you wish it add or the bug you intend to fix
1. Fork it ( http://github.com/cerebris/jsonapi-resources/fork )
1. Fork it ( https://github.com/speee/jsonapi-resources/fork )
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Run the full test suite (`rake test`)
1. Fix any failing tests
Expand All @@ -59,17 +57,15 @@ gem install jsonapi-resources

## Did you find a bug?

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/cerebris/jsonapi-resources/issues).
* **Ensure the bug was not already reported** by searching on GitHub under [Issues(upstream)](https://github.com/cerebris/jsonapi-resources/issues) or [Issues(speee)](https://github.com/speee/jsonapi-resources/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/cerebris/jsonapi-resources/issues/new).
Be sure to include a **title and clear description**, as much relevant information as possible,
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/speee/jsonapi-resources/issues/new).
Be sure to include a **title and clear description**, as much relevant information as possible,
and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

* If possible, use the relevant bug report templates to create the issue.
Simply copy the content of the appropriate template into a .rb file, make the necessary changes to demonstrate the issue,
* If possible, use the relevant bug report templates to create the issue.
Simply copy the content of the appropriate template into a .rb file, make the necessary changes to demonstrate the issue,
and **paste the content into the issue description or attach as a file**:
* [**Rails 5** issues](https://github.com/cerebris/jsonapi-resources/blob/master/lib/bug_report_templates/rails_5_master.rb)


## License

Expand Down
2 changes: 1 addition & 1 deletion lib/jsonapi/resources/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module JSONAPI
module Resources
VERSION = '0.11.0.beta1'
VERSION = '26.1.0'
end
end