Skip to content

Commit 1bdcaf9

Browse files
committed
authenticate with pypi in GHA
1 parent 285ccce commit 1bdcaf9

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/main.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,14 @@ jobs:
2727
- name: Install tools
2828
uses: ./.github/actions/asdf_install
2929
- name: Test
30-
run: ./go library:build
30+
run: ./go library:build
31+
32+
prerelease:
33+
runs-on: ubuntu-latest
34+
needs: [check, test, build]
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: Install tools
38+
uses: ./.github/actions/asdf_install
39+
- name: Authenticate with PyPi
40+
run: ./go poetry:login_with_pypi[${{ secrets.PYPI_API_KEY }}]

Rakefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,10 @@ end
189189

190190
namespace :poetry do
191191
desc 'Login to PyPI'
192-
task :login_to_pypi do
193-
pypi_config =
194-
YAML.load_file('config/secrets/pypi/config.yaml')
192+
task :login_to_pypi[api_token] do |_, args|
195193

196194
invoke_poetry_command(
197-
'config', 'pypi-token.pypi', pypi_config['pypi_api_token']
195+
'config', 'pypi-token.pypi', args.api_token
198196
)
199197
end
200198
end

0 commit comments

Comments
 (0)