forked from Mons/tnt-config
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: adds github workflow for autorelease
- Loading branch information
Vladislav Grubov
committed
Jan 16, 2023
1 parent
356ef4f
commit 5c64a4c
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Create and push rockspec for moonlibs/config | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
ROCK_NAME: config | ||
|
||
jobs: | ||
pack-and-push-tagged-rockspec: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags') | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: tarantool/setup-tarantool@v1 | ||
with: | ||
tarantool-version: '2.6' | ||
|
||
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
- name: Set env | ||
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- run: tarantoolctl rocks new_version --tag=${{ env.TAG }} rockspecs/config-scm-5.rockspec ${{ env.TAG }} "git+https://github.com/${{ github.repository }}.git" | ||
- run: tarantoolctl rocks --server https://moonlibs.github.io/rocks install ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec | ||
- run: tarantoolctl rocks pack ${{ env.ROCK_NAME }}-${{ env.TAG }}-1.rockspec | ||
# Install native lua with luarocks | ||
- uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: "luajit-2.1.0-beta3" | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
with: | ||
luarocksVersion: "3.8.0" | ||
- uses: unfor19/install-aws-cli-action@v1.0.3 | ||
- run: mkdir .build && cp ${{env.ROCK_NAME}}-dev-1.rockspec ${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec .build/ && cp *.src.rock .build/ | ||
- name: rebuild and publish s3 luarocks server | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.MOONLIBS_S3_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.MOONLIBS_S3_SECRET_KEY}} | ||
AWS_EC2_METADATA_DISABLED: true | ||
run: | | ||
cd .build && aws s3 sync s3://moonlibs/ ./ && luarocks-admin make_manifest . && aws s3 sync --acl public-read ./ s3://moonlibs/; | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
README.md | ||
${{env.ROCK_NAME}}-dev-1.rockspec | ||
${{env.ROCK_NAME}}-${{env.TAG}}-1.rockspec | ||
${{env.ROCK_NAME}}-${{env.TAG}}-1.src.rock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package = "config" | ||
version = "dev-1" | ||
source = { | ||
url = "git+https://github.com/moonlibs/config", | ||
branch = "master" | ||
} | ||
description = { | ||
summary = "Package for loading external lua config", | ||
homepage = "https://github.com/moonlibs/config.git", | ||
license = "BSD" | ||
} | ||
dependencies = { | ||
"lua >= 5.1" | ||
} | ||
build = { | ||
type = "builtin", | ||
modules = { | ||
config = "config.lua", | ||
["config.etcd"] = "config/etcd.lua" | ||
} | ||
} |