-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (52 loc) · 1.7 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Release Vendored Gemfile
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get next release version (dry run)
id: taggerDryRun
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true
- name: Show next version
env:
CURR_TAG: ${{ steps.taggerDryRun.outputs.tag }}"
NEW_TAG: ${{ steps.taggerDryRun.outputs.new_tag }}
run: |
echo "The next tag version will be: $NEW_TAG"
echo "The current tag is: $CURR_TAG"
./update_version.rb $NEW_TAG
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
bundler-cache: true
- name: Bundle and install dependencies
run: bundle install --path=vendor/bundle
- name: Build distribution
run: gem build ruby_ast_gen.gemspec
- name: Add and commit updated files holding version information
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: |
lib/ruby_ast_gen/version.rb
Gemfile.lock
commit_message: Update VERSION file
- name: Upload vendored distribution to GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_PERMISSIONS: "read:packages, write:packages"
with:
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }}
files: ruby_ast_gen-*.gem