Skip to content

Commit

Permalink
release: v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Feb 3, 2023
1 parent 004c54d commit 009ab03
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v1.0.0] - 2023-02-03
### Added
- First release.
48 changes: 22 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# [WIP] LuaRocks tag release action

> :warning:
>
> This action is a work in progress and may be moved to another oragnisation.
# LuaRocks tag release action

Publishes packages to [LuaRocks](https://luarocks.org/) when a git tag is pushed.
No need to add a rockspec to your repository for each release (or at all).
Expand All @@ -16,14 +12,14 @@ No need to add a rockspec to your repository for each release (or at all).

## Prerequisites

* A Luarocks account and an [API key](https://luarocks.org/settings/api-keys).
* A LuaRocks account and an [API key](https://luarocks.org/settings/api-keys).
* Add the API key to your [repository's GitHub Actions secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).

## Usage

Create `.github/workflows/release.yml` in your repository with the following contents:
```yaml
name: Luarocks release
name: LuaRocks release
on:
push:
tags:
Expand All @@ -32,12 +28,12 @@ on:
jobs:
luarocks-release:
runs-on: ubuntu-latest
name: Luarocks upload
name: LuaRocks upload
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
```
Expand All @@ -55,13 +51,13 @@ The name of the the luarocks package.
### `dependencies`

Lua dependencies.
Any dependencies specified here must be available on Luarocks.
Any dependencies specified here must be available on LuaRocks.

Example:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
dependencies: |
plenary.nvim
Expand All @@ -76,8 +72,8 @@ If none are specified, this action will use the repository's GitHub.
Example:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
labels: |
neovim
Expand All @@ -90,15 +86,15 @@ Directories in the source directory to be copied to the rock installation prefix
Example to specify additional directories:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
copy_directories: |
doc
plugin
```

> :warning:
>**Warning**
>
> Do not use the following directory names: `lua`, `lib`, `rock_manifest` or the name of your rockspec; those names are used by the .rock format internally, and attempting to copy directories with those names using the build.copy_directories directive will cause a clash.

Expand All @@ -114,8 +110,8 @@ A more detailed description of the package. Can be multiple lines.
Example:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
detailed_description: |
Publishes packages to LuaRocks when a git tag is pushed.
Expand All @@ -133,8 +129,8 @@ The LuaRocks build backend.
Example:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
build_type: "make"
```
Expand All @@ -149,17 +145,17 @@ You can also add a modified template to your repository and specify the path to
Example:

```yaml
- name: Luarocks Upload
uses: mrcjkb/luarocks-tag-release@master
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v1.0.0
with:
template: "/path/to/my/template.rockspec"
```

## Limitations

* This workflow only works on public repositories.
* It was designed with Neovim plugins in mind. It should work with any Luarocks package (lua >= 5.1), but this has not been tested.
* The docker image uses lua 5.1. So any packages that depend on lua > 5.1 will fail to install.
* It was designed with Neovim plugins in mind. It should work with any LuaRocks package (lua >= 5.1), but this has not been tested.
* This action uses lua 5.1. So any packages that depend on lua > 5.1 will fail to install.

## Acknowledgements

Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 'Luarocks tag release'
description: 'Publish a package to Luarocks when a new tag is pushed'
name: 'LuaRocks tag release'
description: 'Publish a package to LuaRocks when a new tag is pushed'
author: 'Marc Jakobi'
branding:
color: 'purple'
Expand All @@ -11,7 +11,7 @@ inputs:
required: true
default: ${{ github.event.repository.name }}
dependencies:
description: "List of Luarocks dependencies."
description: "List of LuaRocks dependencies."
required: true
default: ""
labels:
Expand Down

0 comments on commit 009ab03

Please sign in to comment.